+ drivers-base-platform-notify-needs-to-occur.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     drivers/base: Platform notify needs to occur before drivers attach to the device

has been added to the -mm tree.  Its filename is

     drivers-base-platform-notify-needs-to-occur.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: drivers/base: Platform notify needs to occur before drivers attach to the device
From: Brian Walsh <brian@xxxxxxxx>

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@xxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/base/core.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -puN drivers/base/core.c~drivers-base-platform-notify-needs-to-occur drivers/base/core.c
--- a/drivers/base/core.c~drivers-base-platform-notify-needs-to-occur
+++ a/drivers/base/core.c
@@ -386,6 +386,10 @@ int device_add(struct device *dev)
 	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)
@@ -445,10 +449,6 @@ int device_add(struct device *dev)
 		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);
_

Patches currently in -mm which might be from brian@xxxxxxxx are

drivers-base-platform-notify-needs-to-occur.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux