Commit 5a7689fd authored by Sebastian Ott's avatar Sebastian Ott Committed by Greg Kroah-Hartman

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: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1c6c030
...@@ -743,7 +743,6 @@ int bus_add_driver(struct device_driver *drv) ...@@ -743,7 +743,6 @@ int bus_add_driver(struct device_driver *drv)
} }
} }
kobject_uevent(&priv->kobj, KOBJ_ADD);
return 0; return 0;
out_unregister: out_unregister:
......
...@@ -187,6 +187,9 @@ int driver_register(struct device_driver *drv) ...@@ -187,6 +187,9 @@ int driver_register(struct device_driver *drv)
ret = driver_add_groups(drv, drv->groups); ret = driver_add_groups(drv, drv->groups);
if (ret) if (ret)
bus_remove_driver(drv); bus_remove_driver(drv);
kobject_uevent(&drv->p->kobj, KOBJ_ADD);
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(driver_register); EXPORT_SYMBOL_GPL(driver_register);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment