From: Nathan Lynch Date: Sat, 25 Jun 2005 21:55:05 +0000 (-0700) Subject: [PATCH] generate hotplug events for cpu online X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fb69c3907ead36b9e9f41ea6f0d0e0ae10a38a47;p=mv-sheeva.git [PATCH] generate hotplug events for cpu online 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 0bf2dc11cdb..b79badd0f15 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -44,6 +44,8 @@ static ssize_t store_online(struct sys_device *dev, const char *buf, ret = smp_prepare_cpu(cpu->sysdev.id); if (!ret) ret = cpu_up(cpu->sysdev.id); + if (!ret) + kobject_hotplug(&dev->kobj, KOBJ_ONLINE); break; default: ret = -EINVAL;