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>
This commit is contained in:
Akinobu Mita 2006-11-21 04:53:18 +09:00 коммит произвёл Greg Kroah-Hartman
Родитель 1f71740ab9
Коммит 44c53c4ff0
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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);
}