summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-12-21 17:57:12 -0800
committerFelipe Balbi <balbi@ti.com>2013-01-10 12:40:46 +0200
commit348409a267e441c46345f325db37e9824fcf675e (patch)
tree4e27baf4c3f4c0ee3724065403a69a635c9d4471
parent32c9cf22fccb371745bde98e1da1c3aeb4bb9f36 (diff)
downloadlinux-3.10-348409a267e441c46345f325db37e9824fcf675e.tar.gz
linux-3.10-348409a267e441c46345f325db37e9824fcf675e.tar.bz2
linux-3.10-348409a267e441c46345f325db37e9824fcf675e.zip
usb: gadget: at91_udc: don't use [delayed_]work_pending()
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>
-rw-r--r--drivers/usb/gadget/at91_udc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index f4a21f6f081..e81d8a223f7 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,