From: Sebastian Ott Date: Mon, 2 Jul 2012 17:08:15 +0000 (+0200) Subject: driver core: move uevent call to driver_register X-Git-Tag: v3.6-rc1~99^2~14^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a7689fd5b4f2094e7a32beae67f290f8619b042;p=profile%2Fivi%2Fkernel-x86-ivi.git driver core: move uevent call to driver_register Device driver attribute groups are created after userspace is notified via an add event. Fix this by moving the kobject_uevent call to driver_register after the attribute groups are added. Signed-off-by: Sebastian Ott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 2bcef65..181ed26 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -743,7 +743,6 @@ int bus_add_driver(struct device_driver *drv) } } - kobject_uevent(&priv->kobj, KOBJ_ADD); return 0; out_unregister: diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 207c27d..1b500d6 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -187,6 +187,9 @@ int driver_register(struct device_driver *drv) ret = driver_add_groups(drv, drv->groups); if (ret) bus_remove_driver(drv); + + kobject_uevent(&drv->p->kobj, KOBJ_ADD); + return ret; } EXPORT_SYMBOL_GPL(driver_register);