aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-11-08 22:46:14 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 17:52:01 -0500
commit289535334646796fe41f199718e4a731f7411a92 (patch)
tree7536d19daaf603df4d672ab52ea8ad8dd7f29d63 /drivers/base
parent465ae641e4a3e5028aa9c85d3843259aa28a22ce (diff)
Driver core: Call platform_notify_remove later
Move the call to platform_notify_remove() to after the call to bus_remove_device(), where it belongs. It's bogus to notify the platform of removal while drivers are still attached to the device and possibly still operating since the platform might use this callback to tear down some resources used by the driver (ACPI bits, iommu table, ...) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index f544adc5a5e2..5d11bbdfbd2f 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -682,6 +682,7 @@ void device_del(struct device * dev)
682 device_remove_file(dev, &dev->uevent_attr); 682 device_remove_file(dev, &dev->uevent_attr);
683 device_remove_groups(dev); 683 device_remove_groups(dev);
684 device_remove_attrs(dev); 684 device_remove_attrs(dev);
685 bus_remove_device(dev);
685 686
686 /* Notify the platform of the removal, in case they 687 /* Notify the platform of the removal, in case they
687 * need to do anything... 688 * need to do anything...
@@ -691,7 +692,6 @@ void device_del(struct device * dev)
691 if (dev->bus) 692 if (dev->bus)
692 blocking_notifier_call_chain(&dev->bus->bus_notifier, 693 blocking_notifier_call_chain(&dev->bus->bus_notifier,
693 BUS_NOTIFY_DEL_DEVICE, dev); 694 BUS_NOTIFY_DEL_DEVICE, dev);
694 bus_remove_device(dev);
695 device_pm_remove(dev); 695 device_pm_remove(dev);
696 kobject_uevent(&dev->kobj, KOBJ_REMOVE); 696 kobject_uevent(&dev->kobj, KOBJ_REMOVE);
697 kobject_del(&dev->kobj); 697 kobject_del(&dev->kobj);