public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.18-rc1 1/1] drivers/base: Platform notify needs to occur before drivers attach to the device
@ 2006-07-10 19:52 Brian Walsh
  0 siblings, 0 replies; only message in thread
From: Brian Walsh @ 2006-07-10 19:52 UTC (permalink / raw)
  To: linux-kernel

The platform_notify call for Arm and PPC architectures needs to be
called before the driver attaches to the device.  The problem only
presents itself when hotplugging certain devices while the driver is
already loaded.


Signed-off-by: Brian Walsh <brian@walsh.ws>
---

diff -ur a/drivers/base/core.c b/drivers/base/core.c
--- a/drivers/base/core.c       2006-07-10 13:26:00.000000000 -0400
+++ b/drivers/base/core.c       2006-07-10 13:32:58.000000000 -0400
@@ -307,6 +307,10 @@
        if ((error = kobject_add(&dev->kobj)))
                goto Error;

+       /* notify platform of device entry */
+       if (platform_notify)
+               platform_notify(dev);
+
        dev->uevent_attr.attr.name = "uevent";
        dev->uevent_attr.attr.mode = S_IWUSR;
        if (dev->driver)
@@ -361,10 +365,6 @@
                list_add_tail(&dev->node, &dev->class->devices);
                up(&dev->class->sem);
        }
-
-       /* notify platform of device entry */
-       if (platform_notify)
-               platform_notify(dev);
  Done:
        kfree(class_name);
        put_device(dev);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-10 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-10 19:52 [PATCH 2.6.18-rc1 1/1] drivers/base: Platform notify needs to occur before drivers attach to the device Brian Walsh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox