[patch 2/2] Input: kxtj9: fix locking typo in kxtj9_set_poll()

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE5517d

2 messages, 2 authors, 2011-07-20 · open the first message on its own page

[patch 2/2] Input: kxtj9: fix locking typo in kxtj9_set_poll()

From: Dan Carpenter <hidden>
Date: 2011-07-20 05:32:59

According to the comments we want to call mutex_lock() here instead
of mutex_unlock().  That makes more sense.

Signed-off-by: Dan Carpenter <redacted>
diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c
index 6c96dc3..c456f63 100644
--- a/drivers/input/misc/kxtj9.c
+++ b/drivers/input/misc/kxtj9.c
@@ -362,7 +362,7 @@ static ssize_t kxtj9_set_poll(struct device *dev, struct device_attribute *attr,
 		return error;
 
 	/* Lock the device to prevent races with open/close (and itself) */
-	mutex_unlock(&input_dev->mutex);
+	mutex_lock(&input_dev->mutex);
 
 	disable_irq(client->irq);
 

Re: [patch 2/2] Input: kxtj9: fix locking typo in kxtj9_set_poll()

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2011-07-20 06:19:13

On Wed, Jul 20, 2011 at 08:31:08AM +0300, Dan Carpenter wrote:
According to the comments we want to call mutex_lock() here instead
of mutex_unlock().  That makes more sense.
Applied both, thanks Dan.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help