All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core: move uevent call to driver_register
@ 2012-07-02 17:08 Sebastian Ott
  2012-07-17  1:01 ` Greg Kroah-Hartman
  2012-07-17  1:35 ` Ming Lei
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Ott @ 2012-07-02 17:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel


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>
---
 drivers/base/bus.c    |    1 -
 drivers/base/driver.c |    3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -743,7 +743,6 @@ int bus_add_driver(struct device_driver 
 		}
 	}
 
-	kobject_uevent(&priv->kobj, KOBJ_ADD);
 	return 0;
 
 out_unregister:
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -187,6 +187,9 @@ int driver_register(struct device_driver
 	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);


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-17  8:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-02 17:08 [PATCH] driver core: move uevent call to driver_register Sebastian Ott
2012-07-17  1:01 ` Greg Kroah-Hartman
2012-07-17  1:35 ` Ming Lei
2012-07-17  1:45   ` Greg Kroah-Hartman
2012-07-17  8:39     ` Sebastian Ott
2012-07-17  8:35   ` Sebastian Ott

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.