X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fbase%2Fdd.c;h=2f32f38a11ed0b1c176bffeaf94005216152418c;hb=b97d4c424e362ebf88fd9aa1b7ad82e3a28c26d3;hp=148e81969e04625ce1645c4c1857facb3360d1bd;hpb=1ac0884d5474fea8dc6ceabbd0e870d1bf4b7b42;p=linux-2.6-microblaze.git diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 148e81969e04..2f32f38a11ed 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -370,6 +370,13 @@ static void driver_bound(struct device *dev) device_pm_check_callbacks(dev); + /* + * Reorder successfully probed devices to the end of the device list. + * This ensures that suspend/resume order matches probe order, which + * is usually what drivers rely on. + */ + device_pm_move_to_tail(dev); + /* * Make sure the device is no longer in one of the deferred lists and * kick off retrying all pending devices @@ -717,7 +724,7 @@ EXPORT_SYMBOL_GPL(wait_for_device_probe); * * If the device has a parent, runtime-resume the parent before driver probing. */ -int driver_probe_device(struct device_driver *drv, struct device *dev) +static int driver_probe_device(struct device_driver *drv, struct device *dev) { int ret = 0;