Input: lm8323 - fix checking PWM interrupt status
authorNickolai Zeldovich <nickolai@csail.mit.edu>
Sat, 5 Jan 2013 22:38:17 +0000 (14:38 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 6 Jan 2013 08:52:21 +0000 (00:52 -0800)
INT_PWM1 is already a bitmask, not the bit number, so shifting by INT_PWM1 is
incorrect.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/lm8323.c

index 93c812662134392aa973d9dcff4ffec97b601205..0de23f41b2d316364b8a0f50b8b1b72ca5c9555b 100644 (file)
@@ -398,7 +398,7 @@ static irqreturn_t lm8323_irq(int irq, void *_lm)
                        lm8323_configure(lm);
                }
                for (i = 0; i < LM8323_NUM_PWMS; i++) {
-                       if (ints & (1 << (INT_PWM1 + i))) {
+                       if (ints & (INT_PWM1 << i)) {
                                dev_vdbg(&lm->client->dev,
                                         "pwm%d engine completed\n", i);
                                pwm_done(&lm->pwm[i]);