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>

1 file changed