projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f71740
)
driver core: delete virtual directory on class_unregister()
author
Akinobu Mita
<akinobu.mita@gmail.com>
Mon, 20 Nov 2006 19:53:18 +0000
(
04:53
+0900)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 13 Dec 2006 23:38:45 +0000
(15:38 -0800)
Class virtual directory is created as the need arises.
But it is not deleted when the class is unregistered.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/class.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/class.c
b/drivers/base/class.c
index f098881f45b28129ec58aeae78e761fc4768e9bd..8bf2ca2e56b53ccb07a5ea8c32baec7fc1e51488 100644
(file)
--- a/
drivers/base/class.c
+++ b/
drivers/base/class.c
@@
-163,6
+163,8
@@
int class_register(struct class * cls)
void class_unregister(struct class * cls)
{
pr_debug("device class '%s': unregistering\n", cls->name);
+ if (cls->virtual_dir)
+ kobject_unregister(cls->virtual_dir);
remove_class_attrs(cls);
subsystem_unregister(&cls->subsys);
}