From: Nathan Lynch We already do kobject_hotplug for cpu offline; this adds a kobject_hotplug call for the online case. This is being requested by developers of an application which wants to be notified about both kinds of events. Signed-off-by: Nathan Lynch Cc: Rusty Russell Cc: Greg KH Signed-off-by: Andrew Morton --- drivers/base/cpu.c | 2 ++ 1 files changed, 2 insertions(+) diff -puN drivers/base/cpu.c~generate-hotplug-events-for-cpu-online drivers/base/cpu.c --- 25/drivers/base/cpu.c~generate-hotplug-events-for-cpu-online 2005-04-25 18:41:35.136765408 -0700 +++ 25-akpm/drivers/base/cpu.c 2005-04-25 18:41:47.303915720 -0700 @@ -43,6 +43,8 @@ static ssize_t store_online(struct sys_d ret = smp_prepare_cpu(cpu->sysdev.id); if (ret == 0) ret = cpu_up(cpu->sysdev.id); + if (!ret) + kobject_hotplug(&dev->kobj, KOBJ_ONLINE); break; default: ret = -EINVAL; _