From: Kuninori Morimoto Date: Wed, 30 May 2012 01:46:06 +0000 (-0700) Subject: driver core: fixup reversed deferred probe order X-Git-Tag: v3.5-rc4~17^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d29cfa57471a5e4b8a7c2a7433eeba170d3ad92;p=profile%2Fivi%2Fkernel-x86-ivi.git driver core: fixup reversed deferred probe order If driver requests probe deferral, it will be added to deferred_probe_pending_list by driver_deferred_probe_add(), but, it used list_add(). Because of that, deferred probe will be run as reversed order. This patch uses list_add_tail(), and solved this issue. Signed-off-by: Kuninori Morimoto Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 1b1cbb5..dcb8a6e 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -100,7 +100,7 @@ static void driver_deferred_probe_add(struct device *dev) mutex_lock(&deferred_probe_mutex); if (list_empty(&dev->p->deferred_probe)) { dev_dbg(dev, "Added to deferred list\n"); - list_add(&dev->p->deferred_probe, &deferred_probe_pending_list); + list_add_tail(&dev->p->deferred_probe, &deferred_probe_pending_list); } mutex_unlock(&deferred_probe_mutex); }