diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-11-20 14:53:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-13 18:38:45 -0500 |
commit | 44c53c4ff01a3551e9d73604eba42e372e9d0c1a (patch) | |
tree | 0c23a5dca8631209cc008ef896e09cfbaf303c41 /drivers | |
parent | 1f71740ab9714bf5ae9ee04c724ff0d5c67ca3dc (diff) |
driver core: delete virtual directory on class_unregister()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/class.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index f098881f45b2..8bf2ca2e56b5 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -163,6 +163,8 @@ int class_register(struct class * cls) | |||
163 | void class_unregister(struct class * cls) | 163 | void class_unregister(struct class * cls) |
164 | { | 164 | { |
165 | pr_debug("device class '%s': unregistering\n", cls->name); | 165 | pr_debug("device class '%s': unregistering\n", cls->name); |
166 | if (cls->virtual_dir) | ||
167 | kobject_unregister(cls->virtual_dir); | ||
166 | remove_class_attrs(cls); | 168 | remove_class_attrs(cls); |
167 | subsystem_unregister(&cls->subsys); | 169 | subsystem_unregister(&cls->subsys); |
168 | } | 170 | } |