forked from Minki/linux
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>
This commit is contained in:
parent
d1c6c030fc
commit
5a7689fd5b
@ -743,7 +743,6 @@ int bus_add_driver(struct device_driver *drv)
|
||||
}
|
||||
}
|
||||
|
||||
kobject_uevent(&priv->kobj, KOBJ_ADD);
|
||||
return 0;
|
||||
|
||||
out_unregister:
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user