diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 21:13:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 21:16:12 -0400 |
commit | a3d52136ee8f7399859f9a0824470fd49b1d1a00 (patch) | |
tree | ac0fd3d1efc356029cbbc5e413f778f7231cd909 /drivers/input/mouse/alps.c | |
parent | 5b339915762d30b21995aa7263e74081f2f1110a (diff) | |
parent | 84767d00a8fd54dd97866561f6e2ee246c8e1cdc (diff) |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (65 commits)
Input: gpio_keys - add support for switches (EV_SW)
Input: cobalt_btns - convert to use polldev library
Input: add skeleton for simple polled devices
Input: update some documentation
Input: wistron - fix typo in keymap for Acer TM610
Input: add input_set_capability() helper
Input: i8042 - add Fujitsu touchscreen/touchpad PNP IDs
Input: i8042 - add Panasonic CF-29 to nomux list
Input: lifebook - split into 2 devices
Input: lifebook - add signature of Panasonic CF-29
Input: lifebook - activate 6-byte protocol on select models
Input: lifebook - work properly on Panasonic CF-18
Input: cobalt buttons - separate device and driver registration
Input: ati_remote - make button repeat sensitivity configurable
Input: pxa27x - do not use deprecated SA_INTERRUPT flag
Input: ucb1400 - make delays configurable
Input: misc devices - switch to using input_dev->dev.parent
Input: joysticks - switch to using input_dev->dev.parent
Input: touchscreens - switch to using input_dev->dev.parent
Input: mice - switch to using input_dev->dev.parent
...
Fixed up conflicts with core device model removal of "struct subsystem" manually.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r-- | drivers/input/mouse/alps.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 4e71a66fc7fc..cf3e4664e72b 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -424,14 +424,15 @@ int alps_init(struct psmouse *psmouse) | |||
424 | struct input_dev *dev1 = psmouse->dev, *dev2; | 424 | struct input_dev *dev1 = psmouse->dev, *dev2; |
425 | int version; | 425 | int version; |
426 | 426 | ||
427 | psmouse->private = priv = kzalloc(sizeof(struct alps_data), GFP_KERNEL); | 427 | priv = kzalloc(sizeof(struct alps_data), GFP_KERNEL); |
428 | dev2 = input_allocate_device(); | 428 | dev2 = input_allocate_device(); |
429 | if (!priv || !dev2) | 429 | if (!priv || !dev2) |
430 | goto init_fail; | 430 | goto init_fail; |
431 | 431 | ||
432 | priv->dev2 = dev2; | 432 | priv->dev2 = dev2; |
433 | 433 | ||
434 | if (!(priv->i = alps_get_model(psmouse, &version))) | 434 | priv->i = alps_get_model(psmouse, &version); |
435 | if (!priv->i) | ||
435 | goto init_fail; | 436 | goto init_fail; |
436 | 437 | ||
437 | if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1)) | 438 | if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1)) |
@@ -480,7 +481,8 @@ int alps_init(struct psmouse *psmouse) | |||
480 | dev2->relbit[LONG(REL_X)] |= BIT(REL_X) | BIT(REL_Y); | 481 | dev2->relbit[LONG(REL_X)] |= BIT(REL_X) | BIT(REL_Y); |
481 | dev2->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 482 | dev2->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); |
482 | 483 | ||
483 | input_register_device(priv->dev2); | 484 | if (input_register_device(priv->dev2)) |
485 | goto init_fail; | ||
484 | 486 | ||
485 | psmouse->protocol_handler = alps_process_byte; | 487 | psmouse->protocol_handler = alps_process_byte; |
486 | psmouse->poll = alps_poll; | 488 | psmouse->poll = alps_poll; |
@@ -491,9 +493,11 @@ int alps_init(struct psmouse *psmouse) | |||
491 | /* We are having trouble resyncing ALPS touchpads so disable it for now */ | 493 | /* We are having trouble resyncing ALPS touchpads so disable it for now */ |
492 | psmouse->resync_time = 0; | 494 | psmouse->resync_time = 0; |
493 | 495 | ||
496 | psmouse->private = priv; | ||
494 | return 0; | 497 | return 0; |
495 | 498 | ||
496 | init_fail: | 499 | init_fail: |
500 | psmouse_reset(psmouse); | ||
497 | input_free_device(dev2); | 501 | input_free_device(dev2); |
498 | kfree(priv); | 502 | kfree(priv); |
499 | return -1; | 503 | return -1; |
@@ -504,7 +508,8 @@ int alps_detect(struct psmouse *psmouse, int set_properties) | |||
504 | int version; | 508 | int version; |
505 | const struct alps_model_info *model; | 509 | const struct alps_model_info *model; |
506 | 510 | ||
507 | if (!(model = alps_get_model(psmouse, &version))) | 511 | model = alps_get_model(psmouse, &version); |
512 | if (!model) | ||
508 | return -1; | 513 | return -1; |
509 | 514 | ||
510 | if (set_properties) { | 515 | if (set_properties) { |