From patchwork Fri Jun 24 14:36:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9197651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9D3406075F for ; Fri, 24 Jun 2016 14:37:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B477284B8 for ; Fri, 24 Jun 2016 14:37:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D069284BA; Fri, 24 Jun 2016 14:37:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 252B8284B8 for ; Fri, 24 Jun 2016 14:37:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BA5B6EAD5; Fri, 24 Jun 2016 14:37:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id DCEB36EAD4 for ; Fri, 24 Jun 2016 14:36:42 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id r201so5511002wme.0 for ; Fri, 24 Jun 2016 07:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=OMEMqcS4CuXD94TS91O12KVE4D+z2GmwSWx/27XR7TQ=; b=mH7f4l3ja0NRhe1vBsXAYWNqNBZAc1Z8wrP6TLYLcA7LGRS1+6X0YGrtbPycu30BhZ 5jhz6CIEfCuNaurePP3wiTyfQNW4iwq+PsW1vgiYuqZBPiK97wVaTH1874PCAM3T1VHB DLvxjH10IevH26Zx5dO6xDb78hZLy9hpLPWZRVL0VbyJCTU2hWm4pGdLZ6bErXFS+W/G 6UxkORDWO5GeiWuDrn2PiSKIhIiseTwokcZ63pxR8UCYGPbbDrwcCaGVLW//3WLPMgfV ACKlj5aPVU8B5l9rOFGtZCm3SATLYqswG7thZdQGFuXHCXJXdnRrRk7qZ+mIDzku6VJv iEuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=OMEMqcS4CuXD94TS91O12KVE4D+z2GmwSWx/27XR7TQ=; b=Z0iyXXFACxYNsOHzOt1cdTYzHdEl9JOjsZvKSXs6NvYya4llhjWmADgk6f9HnzedvE hLXEt7jG41zzGNIrwYx5RNjag+rgY28x9S4Z0TF7Ml2riHpX625+eEZ+UtoeS01xTj4G k2kZGEJSDAW2N7NJ4cKp7idkiUZ/g/VnA1DPa1cCrvH/Qk0fyg8OkPh7mueXXNzjPQ0L duAji4Vm+TqzBBDbeVhLS5QAxk1XPF1Z34Vlt4Bh0uxs9GbDncM6LCvMHsBmVTV8tmAJ NtKwTFw+ly/BqsRCjjQpPbEsduy1hSWFUq7Dt3L4eBtiFfVCQjcvR+0Hjuhj6u5JJ2oA omoQ== X-Gm-Message-State: ALyK8tLBOk0MakWrs2SwB3O/1KItk6MxAoxvkYP65xTJdiwpbWtxoPYQNlA1EZO1KuKsdg== X-Received: by 10.194.170.197 with SMTP id ao5mr3875118wjc.99.1466779000555; Fri, 24 Jun 2016 07:36:40 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id x83sm3421914wmx.9.2016.06.24.07.36.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jun 2016 07:36:39 -0700 (PDT) From: Chris Wilson To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/5] drm: Unexport drm_connector_unregister_all() Date: Fri, 24 Jun 2016 15:36:22 +0100 Message-Id: <1466778982-6974-5-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1466778982-6974-1-git-send-email-chris@chris-wilson.co.uk> References: <1466778982-6974-1-git-send-email-chris@chris-wilson.co.uk> Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This has now been removed from all drivers as it is performed centrally as a part of device unregistration for modesetting drivers. With the last user gone, we can unexport it from the DRM module. That requires us to move the code slightly to avoid the need for a forward declaration. Signed-off-by: Chris Wilson Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/drm_crtc.c | 29 +++++++++-------------------- include/drm/drm_crtc.h | 3 --- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index c660ea28cf26..3ed866b02cbf 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -1109,6 +1109,15 @@ void drm_connector_unregister(struct drm_connector *connector) } EXPORT_SYMBOL(drm_connector_unregister); +static void drm_connector_unregister_all(struct drm_device *dev) +{ + struct drm_connector *connector; + + /* FIXME: taking the mode config mutex ends up in a clash with sysfs */ + list_for_each_entry(connector, &dev->mode_config.connector_list, head) + drm_connector_unregister(connector); +} + static int drm_connector_register_all(struct drm_device *dev) { struct drm_connector *connector; @@ -1132,26 +1141,6 @@ err: return ret; } -/** - * drm_connector_unregister_all - unregister connector userspace interfaces - * @dev: drm device - * - * This functions unregisters all connectors from sysfs and other places so - * that userspace can no longer access them. Drivers should call this as the - * first step tearing down the device instace, or when the underlying - * physical device disappeared (e.g. USB unplug), right before calling - * drm_dev_unregister(). - */ -void drm_connector_unregister_all(struct drm_device *dev) -{ - struct drm_connector *connector; - - /* FIXME: taking the mode config mutex ends up in a clash with sysfs */ - list_for_each_entry(connector, &dev->mode_config.connector_list, head) - drm_connector_unregister(connector); -} -EXPORT_SYMBOL(drm_connector_unregister_all); - static int drm_encoder_register_all(struct drm_device *dev) { struct drm_encoder *encoder; diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index ddaa7243af55..b1e72322ebd6 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -2588,9 +2588,6 @@ static inline unsigned drm_connector_index(struct drm_connector *connector) return connector->connector_id; } -/* helpers to {un}register all connectors from sysfs for device */ -extern void drm_connector_unregister_all(struct drm_device *dev); - extern __printf(5, 6) int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder,