From eff5a355919641c29ffae99a15cbe59b74551e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ADra=20Canal?= Date: Mon, 3 Aug 2026 10:26:52 -0300 Subject: [PATCH] drm/sysfs: Remove drm_class_device_(un)register() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The last usage of the functions drm_class_device_register() and drm_class_device_unregister() was removed in commit ed89fff97382 ("drm/ttm: drop sysfs directory"). Remove such functions as they are no longer used. Reviewed-by: Jani Nikula Link: https://patch.msgid.link/20260803132706.1497980-2-mcanal@igalia.com Signed-off-by: MaĆ­ra Canal --- drivers/gpu/drm/drm_sysfs.c | 32 -------------------------------- drivers/gpu/drm/ttm/ttm_module.c | 1 - include/drm/drm_sysfs.h | 4 ---- 3 files changed, 37 deletions(-) diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index ef4e923a8728..7b16d32b6ff6 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -589,35 +589,3 @@ err_free: 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/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c index aa137ead5cc5..3daace105930 100644 --- a/drivers/gpu/drm/ttm/ttm_module.c +++ b/drivers/gpu/drm/ttm/ttm_module.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include "ttm_module.h" 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,