Skip to content

Commit

Permalink
usb: gadget: at91_udc: don't use [delayed_]work_pending()
Browse files Browse the repository at this point in the history
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@kernel.org>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: linux-usb@vger.kernel.org
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Tejun Heo authored and Felipe Balbi committed Jan 10, 2013
1 parent 32c9cf2 commit 348409a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/gadget/at91_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 348409a

Please sign in to comment.