drm/sysfs: Remove drm_class_device_(un)register()
Subsystems (3)
PATCH 1/1 drm/sysfs: Remove drm_class_device_(un)register()
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.
--- 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(-)
drivers/gpu/drm/drm_sysfs.c +0 -32
@@ -589,35 +589,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);
drivers/gpu/drm/ttm/ttm_module.c +0 -1
@@ -34,7 +34,6 @@#include <linux/pgtable.h> #include <linux/sched.h> #include <linux/debugfs.h> -#include <drm/drm_sysfs.h> #include <drm/ttm/ttm_caching.h> #include "ttm_module.h"
include/drm/drm_sysfs.h +0 -4
@@ -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,
Signature · 1 line
2.55.0
Hi,
Gentle ping for feedback.
Best regards,
- Maíra
Quoted 83 lines · Maíra Canal
The last usage of the functions
drm_class_device_register()anddrm_class_device_unregister()was removed in commited89fff97382("drm/ttm: drop sysfs directory").Remove such functions as they are no longer used.
Signed-off-by Maíra Canal <[email protected]>--- 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(-)drivers/gpu/drm/drm_sysfs.c +0
-32@@ -589,35 +589,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);drivers/gpu/drm/ttm/ttm_module.c +0
-1@@ -34,7 +34,6 @@#include <linux/pgtable.h> #include <linux/sched.h> #include <linux/debugfs.h> -#include <drm/drm_sysfs.h> #include <drm/ttm/ttm_caching.h> #include "ttm_module.h" include/drm/drm_sysfs.h +0
-4@@ -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,
Quoted 7 lines · Maíra Canal
The last usage of the functions
drm_class_device_register()anddrm_class_device_unregister()was removed in commited89fff97382("drm/ttm: drop sysfs directory").Remove such functions as they are no longer used.
Signed-off-by Maíra Canal <[email protected]>
Quoted 76 lines
--- 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(-)drivers/gpu/drm/drm_sysfs.c +0
-32@@ -589,35 +589,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);drivers/gpu/drm/ttm/ttm_module.c +0
-1@@ -34,7 +34,6 @@#include <linux/pgtable.h> #include <linux/sched.h> #include <linux/debugfs.h> -#include <drm/drm_sysfs.h> #include <drm/ttm/ttm_caching.h> #include "ttm_module.h" include/drm/drm_sysfs.h +0
-4@@ -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,
Signature · 1 line
Jani Nikula, Intel
Maíra Canal
AppliedQuoted 8 lines · Maíra Canal
The last usage of the functions
drm_class_device_register()anddrm_class_device_unregister()was removed in commited89fff97382("drm/ttm: drop sysfs directory").Remove such functions as they are no longer used.
[...]
Applied, thanks!
[1/1] drm/sysfs: Remove drm_class_device_(un)register()
commit: eff5a355919641c29ffae99a15cbe59b74551e8f
Best regards,
- Maíra