[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5229B64A.1030304@huawei.com>
Date: Fri, 6 Sep 2013 19:02:34 +0800
From: Xie XiuQi <xiexiuqi@...wei.com>
To: Jonathan Cameron <jic23@....ac.uk>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Dmitry Torokhov <dtor@...l.ru>,
Thomas Gleixner <tglx@...utronix.de>,
Andres Salomon <dilinger@...ued.net>,
Chris Ball <cjb@...top.org>,
Jon Nettleton <jon.nettleton@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Nadia Derbey <Nadia.Derbey@...l.net>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Li Bin <huawei.libin@...wei.com>, Tejun Heo <tj@...nel.org>
Subject: [PATCH 1/5] iio: adc: remove unnecessary work pending test
Remove unnecessary work pending test before calling schedule_work().
It has been tested in queue_work_on() already. No functional changed.
Signed-off-by: Xie XiuQi <xiexiuqi@...wei.com>
Cc: Tejun Heo <tj@...nel.org>
---
drivers/staging/iio/adc/ad7606_core.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c
index 72868ce..c6f99069 100644
--- a/drivers/staging/iio/adc/ad7606_core.c
+++ b/drivers/staging/iio/adc/ad7606_core.c
@@ -424,10 +424,9 @@ static irqreturn_t ad7606_interrupt(int irq, void *dev_id)
struct iio_dev *indio_dev = dev_id;
struct ad7606_state *st = iio_priv(indio_dev);
- if (iio_buffer_enabled(indio_dev)) {
- if (!work_pending(&st->poll_work))
- schedule_work(&st->poll_work);
- } else {
+ if (iio_buffer_enabled(indio_dev))
+ schedule_work(&st->poll_work);
+ else {
st->done = true;
wake_up_interruptible(&st->wq_data_avail);
}
--
1.8.2.2
--
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