From: Brian Walsh 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 Cc: Greg KH Signed-off-by: Andrew Morton --- 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); _