sysdev: fix problem with sysdev_class being re-registered
authorGreg Kroah-Hartman <gregkh@suse.de>
Sat, 8 Mar 2008 22:07:16 +0000 (03:37 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 10 Mar 2008 23:33:32 +0000 (16:33 -0700)
commitef79df263062fd04fe9db4ee1b9f014a87a8e924
treefbf7ba4e96597b7f7baa461853060c3abde8f79d
parentcdeeeae056a429e729ae9e914fa8142ee45bee93
sysdev: fix problem with sysdev_class being re-registered

We need to initialize the kobject for a sysdev_class as it could have
been recycled (stupid static kobjects...)

We also do the same thing in case sysdev devices are being
re-registered.

Thanks to Balaji Rao <balajirrao@gmail.com> for pointing out the
problem.

Signed-off-by: Balaji Rao <balajirrao@gmail.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/sys.c