From patchwork Tue Oct 29 23:47:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 13855752 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6271FD7494E for ; Tue, 29 Oct 2024 23:47:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D78A10E727; Tue, 29 Oct 2024 23:47:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=treblig.org header.i=@treblig.org header.b="DKnuj4ZS"; dkim-atps=neutral Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1977B10E3CE for ; Tue, 29 Oct 2024 23:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=LC9oDJnN6kZ4N2r0wYkvLK4l047d103spGwC2xW8urY=; b=DKnuj4ZSPCZJ7dwY SSvTfgPhvo6RSEBo1I+GWqXzb15GR1b7tdqHL2yGNQmxQa6hqNqYjl3eIKuODD8sANfUY69SsNMxv nfmXtwqIhFpqPcFhV2GFSEZmXa6KeVrb1zemEFGxI5Er5GACONoNjFvNtPQUKxOkEuSPiw1v/b3AN amJEmiQ1isOkA6qv1XSypYCAapuJVbQovSZ+ZkKVLHUJpWFvTCxm3jS1DcToeRq4+v0VYioqAuESq s2xPt7lC6mC0B4Z18Tu2fo8nqNZQkTHXthK7QD6zNWfLGQpOxuuHuUIAGyDakr1eXTl0aLM3cZ6OI ORdAh9XTcFXvgjWfTw==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t5vvY-00EMNX-2O; Tue, 29 Oct 2024 23:47:08 +0000 From: linux@treblig.org To: dmitry.baryshkov@linaro.org, ville.syrjala@linux.intel.com, jfalempe@redhat.com, tomi.valkeinen@ideasonboard.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH v2 2/3] drm/sysfs: Remove unused drm_class_device_(un)register Date: Tue, 29 Oct 2024 23:47:04 +0000 Message-ID: <20241029234706.285087-3-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241029234706.285087-1-linux@treblig.org> References: <20241029234706.285087-1-linux@treblig.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: "Dr. David Alan Gilbert" drm_class_device_register() and drm_class_device_unregister() have been unused since commit ed89fff97382 ("drm/ttm: drop sysfs directory") Remove them. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_sysfs.c | 32 -------------------------------- include/drm/drm_sysfs.h | 4 ---- 2 files changed, 36 deletions(-) diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index fb3bbb6adcd1..3bc90fe5cea3 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -548,35 +548,3 @@ struct device *drm_sysfs_minor_alloc(struct drm_minor *minor) put_device(kdev); return ERR_PTR(r); } - -/** - * drm_class_device_register - register new device with the DRM sysfs class - * @dev: device to register - * - * Registers a new &struct device within the DRM sysfs class. Essentially only - * used by ttm to have a place for its global settings. Drivers should never use - * this. - */ -int drm_class_device_register(struct device *dev) -{ - if (!drm_class || IS_ERR(drm_class)) - return -ENOENT; - - dev->class = drm_class; - return device_register(dev); -} -EXPORT_SYMBOL_GPL(drm_class_device_register); - -/** - * drm_class_device_unregister - unregister device with the DRM sysfs class - * @dev: device to unregister - * - * Unregisters a &struct device from the DRM sysfs class. Essentially only used - * by ttm to have a place for its global settings. Drivers should never use - * this. - */ -void drm_class_device_unregister(struct device *dev) -{ - return device_unregister(dev); -} -EXPORT_SYMBOL_GPL(drm_class_device_unregister); diff --git a/include/drm/drm_sysfs.h b/include/drm/drm_sysfs.h index 96a5d858404b..7695873a9456 100644 --- a/include/drm/drm_sysfs.h +++ b/include/drm/drm_sysfs.h @@ -3,13 +3,9 @@ #define _DRM_SYSFS_H_ struct drm_device; -struct device; struct drm_connector; struct drm_property; -int drm_class_device_register(struct device *dev); -void drm_class_device_unregister(struct device *dev); - void drm_sysfs_hotplug_event(struct drm_device *dev); void drm_sysfs_connector_hotplug_event(struct drm_connector *connector); void drm_sysfs_connector_property_event(struct drm_connector *connector,