Commit 1d29cfa5 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Greg Kroah-Hartman

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6ebb017d
...@@ -100,7 +100,7 @@ static void driver_deferred_probe_add(struct device *dev) ...@@ -100,7 +100,7 @@ static void driver_deferred_probe_add(struct device *dev)
mutex_lock(&deferred_probe_mutex); mutex_lock(&deferred_probe_mutex);
if (list_empty(&dev->p->deferred_probe)) { if (list_empty(&dev->p->deferred_probe)) {
dev_dbg(dev, "Added to deferred list\n"); 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); mutex_unlock(&deferred_probe_mutex);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment