[PATCH 2/5] input: remove unnecessary work pending test

From: Xie XiuQi
Date: Fri Sep 06 2013 - 07:04:21 EST


Remove unnecessary work pending test before calling schedule_work().
It has been tested in queue_work_on() already.

Signed-off-by: Xie XiuQi <xiexiuqi@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
---
drivers/input/touchscreen/cyttsp4_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c
index edcf799..b0ee865 100644
--- a/drivers/input/touchscreen/cyttsp4_core.c
+++ b/drivers/input/touchscreen/cyttsp4_core.c
@@ -1249,8 +1249,7 @@ static void cyttsp4_watchdog_timer(unsigned long handle)
if (!cd)
return;

- if (!work_pending(&cd->watchdog_work))
- schedule_work(&cd->watchdog_work);
+ schedule_work(&cd->watchdog_work);

return;
}
--
1.8.2.2



--
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/