Re: [PATCH] driver core: fixup reversed deferred probe order

From: Grant Likely
Date: Mon Jul 09 2012 - 17:56:19 EST


On Wed, May 30, 2012 at 2:46 AM, Kuninori Morimoto
<kuninori.morimoto.gx@xxxxxxxxxxx> wrote:
> 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 <kuninori.morimoto.gx@xxxxxxxxxxx>

Acked-by: Grant Likely <grant.likely@xxxxxxxxxxxx>

(But not tested; I'm not in a position to test anything at the moment) :-(

g.

> ---
> drivers/base/dd.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> 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);
> }
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/



--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/