summaryrefslogtreecommitdiff
path: root/drivers/base/driver.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2012-07-02 19:08:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 18:04:25 -0700
commit5a7689fd5b4f2094e7a32beae67f290f8619b042 (patch)
tree916abff6c0ff79ea98d212632e23167c0c94784c /drivers/base/driver.c
parentd1c6c030fcec6f860d9bb6c632a3ebe62e28440b (diff)
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 <sebott@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r--drivers/base/driver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 207c27ddf828..1b500d6fcc2e 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);