@@ -1826,7 +1826,6 @@ void device_del(struct device *dev)
blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
BUS_NOTIFY_DEL_DEVICE, dev);
- device_links_purge(dev);
dpm_sysfs_remove(dev);
if (parent)
klist_del(&dev->p->knode_parent);
@@ -1851,6 +1850,7 @@ void device_del(struct device *dev)
device_remove_file(dev, &dev_attr_uevent);
device_remove_attrs(dev);
bus_remove_device(dev);
+ device_links_purge(dev);
device_pm_remove(dev);
driver_deferred_probe_del(dev);
device_remove_properties(dev);