diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-03 02:38:13 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-03 02:38:13 -0500 |
commit | 467832032cc07626880363efa8625719c16c04eb (patch) | |
tree | ee9a62c04f0b3106e412bc1b2dd1cea5566d5ca7 /drivers/input/input.c | |
parent | 66d2a5952eab875f1286e04f738ef029afdaf013 (diff) | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
Merge commit 'v2.6.32' into next
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 5d6421bde4ba..5c16001959cc 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -1292,17 +1292,24 @@ static int input_dev_uevent(struct device *device, struct kobj_uevent_env *env) | |||
1292 | return 0; | 1292 | return 0; |
1293 | } | 1293 | } |
1294 | 1294 | ||
1295 | #define INPUT_DO_TOGGLE(dev, type, bits, on) \ | 1295 | #define INPUT_DO_TOGGLE(dev, type, bits, on) \ |
1296 | do { \ | 1296 | do { \ |
1297 | int i; \ | 1297 | int i; \ |
1298 | if (!test_bit(EV_##type, dev->evbit)) \ | 1298 | bool active; \ |
1299 | break; \ | 1299 | \ |
1300 | for (i = 0; i < type##_MAX; i++) { \ | 1300 | if (!test_bit(EV_##type, dev->evbit)) \ |
1301 | if (!test_bit(i, dev->bits##bit) || \ | 1301 | break; \ |
1302 | !test_bit(i, dev->bits)) \ | 1302 | \ |
1303 | continue; \ | 1303 | for (i = 0; i < type##_MAX; i++) { \ |
1304 | dev->event(dev, EV_##type, i, on); \ | 1304 | if (!test_bit(i, dev->bits##bit)) \ |
1305 | } \ | 1305 | continue; \ |
1306 | \ | ||
1307 | active = test_bit(i, dev->bits); \ | ||
1308 | if (!active && !on) \ | ||
1309 | continue; \ | ||
1310 | \ | ||
1311 | dev->event(dev, EV_##type, i, on ? active : 0); \ | ||
1312 | } \ | ||
1306 | } while (0) | 1313 | } while (0) |
1307 | 1314 | ||
1308 | #ifdef CONFIG_PM | 1315 | #ifdef CONFIG_PM |