summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorSven Van Asbroeck <TheSven73@gmail.com>2019-02-11 23:15:54 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-02-17 06:39:42 +0100
commitbab4a6cca024dc202b1e893edbe34f58f1d43f3e (patch)
tree59f04d942adf96534195a5b48db8a6fae3b341f7 /drivers/input
parentInput: st1232 - handle common DT bindings (diff)
downloadlinux-bab4a6cca024dc202b1e893edbe34f58f1d43f3e.tar.xz
linux-bab4a6cca024dc202b1e893edbe34f58f1d43f3e.zip
Input: qt2160 - remove redundant spinlock
Remove a spinlock which prevents schedule_delayed_work() and mod_delayed_work() from executing concurrently. This was required back when mod_delayed_work() did not exist, and had to be implemented with a cancel + schedule. See commit e7c2f967445d ("workqueue: use mod_delayed_work() instead of __cancel + queue") schedule_delayed_work() and mod_delayed_work() can now be used concurrently. So the spinlock is no longer needed. Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/qt2160.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/input/keyboard/qt2160.c b/drivers/input/keyboard/qt2160.c
index 43b86482dda0..23dc7c0c7d78 100644
--- a/drivers/input/keyboard/qt2160.c
+++ b/drivers/input/keyboard/qt2160.c
@@ -69,7 +69,6 @@ struct qt2160_data {
struct i2c_client *client;
struct input_dev *input;
struct delayed_work dwork;
- spinlock_t lock; /* Protects canceling/rescheduling of dwork */
unsigned short keycodes[ARRAY_SIZE(qt2160_key2code)];
u16 key_matrix;
#ifdef CONFIG_LEDS_CLASS
@@ -221,22 +220,15 @@ static int qt2160_get_key_matrix(struct qt2160_data *qt2160)
static irqreturn_t qt2160_irq(int irq, void *_qt2160)
{
struct qt2160_data *qt2160 = _qt2160;
- unsigned long flags;
-
- spin_lock_irqsave(&qt2160->lock, flags);
mod_delayed_work(system_wq, &qt2160->dwork, 0);
- spin_unlock_irqrestore(&qt2160->lock, flags);
-
return IRQ_HANDLED;
}
static void qt2160_schedule_read(struct qt2160_data *qt2160)
{
- spin_lock_irq(&qt2160->lock);
schedule_delayed_work(&qt2160->dwork, QT2160_CYCLE_INTERVAL);
- spin_unlock_irq(&qt2160->lock);
}
static void qt2160_worker(struct work_struct *work)
@@ -406,7 +398,6 @@ static int qt2160_probe(struct i2c_client *client,
qt2160->client = client;
qt2160->input = input;
INIT_DELAYED_WORK(&qt2160->dwork, qt2160_worker);
- spin_lock_init(&qt2160->lock);
input->name = "AT42QT2160 Touch Sense Keyboard";
input->id.bustype = BUS_I2C;