[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50EAF716.709@atmel.com>
Date: Mon, 7 Jan 2013 17:25:58 +0100
From: Nicolas Ferre <nicolas.ferre@...el.com>
To: Tejun Heo <tj@...nel.org>
CC: <linux-kernel@...r.kernel.org>, Andrew Victor <linux@...im.org.za>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Felipe Balbi <balbi@...com>, <linux-usb@...r.kernel.org>
Subject: Re: [PATCH 22/25] usb/at91_udc: don't use [delayed_]work_pending()
On 12/22/2012 02:57 AM, Tejun Heo :
> There's no need to test whether a (delayed) work item in pending
> before queueing, flushing or cancelling it. Most uses are unnecessary
> and quite a few of them are buggy.
>
> Remove unnecessary pending tests from at91_udc. Only compile tested.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Andrew Victor <linux@...im.org.za>
> Cc: Nicolas Ferre <nicolas.ferre@...el.com>
Acked-by: Nicolas Ferre <nicolas.ferre@...el.com>
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
> Cc: Felipe Balbi <balbi@...com>
> Cc: linux-usb@...r.kernel.org
> ---
> Please let me know how this patch should be routed. I can take it
> through the workqueue tree if necessary.
>
> Thanks.
>
> drivers/usb/gadget/at91_udc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
> index f4a21f6..e81d8a2 100644
> --- a/drivers/usb/gadget/at91_udc.c
> +++ b/drivers/usb/gadget/at91_udc.c
> @@ -1621,8 +1621,7 @@ static void at91_vbus_timer(unsigned long data)
> * bus such as i2c or spi which may sleep, so schedule some work
> * to read the vbus gpio
> */
> - if (!work_pending(&udc->vbus_timer_work))
> - schedule_work(&udc->vbus_timer_work);
> + schedule_work(&udc->vbus_timer_work);
> }
>
> static int at91_start(struct usb_gadget *gadget,
>
--
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists