diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-31 11:33:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-31 17:45:11 +0200 |
commit | e78195d52981fc634a4e1e66610a316088bd7458 (patch) | |
tree | c6d53488401dafb57d067a937b338a7ee464b3c2 /drivers/base | |
parent | driver core: clean up the logic to determine which /sys/dev/ directory to use (diff) | |
download | linux-e78195d52981fc634a4e1e66610a316088bd7458.tar.xz linux-e78195d52981fc634a4e1e66610a316088bd7458.zip |
driver core: class: remove dev_kobj from struct class
The dev_kobj field in struct class is now only written to, but never
read from, so it can be removed as it is useless.
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230331093318.82288-5-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/class.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index fcfb295363cc..06b96d6faa19 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -197,10 +197,6 @@ int class_register(struct class *cls) return error; } - /* set the default /sys/dev directory for devices of this class */ - if (!cls->dev_kobj) - cls->dev_kobj = sysfs_dev_char_kobj; - cp->subsys.kobj.kset = class_kset; cp->subsys.kobj.ktype = &class_ktype; cp->class = cls; |