cpu topology: consider sysfs_create_group return value
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 9 Nov 2006 03:46:09 +0000 (19:46 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:52:01 +0000 (14:52 -0800)
commit06a4bcae1ff2cd5f6f42bd74add85ec785a26343
tree666cba3de43b602125df3b143a08d22f4188b13b
parent289535334646796fe41f199718e4a731f7411a92
cpu topology: consider sysfs_create_group return value

Take return value of sysfs_create_group() into account.  That function got
called in case of CPU_ONLINE notification.  Since callbacks are not allowed
to fail on CPU_ONLINE notification do the sysfs group creation on
CPU_UP_PREPARE notification.

Also remember if creation succeeded in a bitmask.  So it's possible to know
whether it's legal to call sysfs_remove_group or not.

In addition some other minor stuff:

- since CPU_UP_PREPARE might fail add CPU_UP_CANCELED handling as well.
- use hotcpu_notifier instead of register_hotcpu_notifier.
- #ifdef code that isn't needed in the !CONFIG_HOTPLUG_CPU case.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/topology.c