diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 17:56:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 17:56:51 -0700 |
commit | 133309a89e7430f907ebe85e78906ee12c311727 (patch) | |
tree | daa96e6e82b63c0ef1538dcbb455d13595a1c83d /drivers/input/mouse/alps.c | |
parent | 5489375d481c8456c8259b48e107d03b05309d1d (diff) | |
parent | fc8e1ead9314cf0e0f1922e661428b93d3a50d88 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (52 commits)
Input: bcm5974 - silence uninitialized variables warnings
Input: wistron_btns - add keymap for AOpen 1557
Input: psmouse - use boolean type
Input: i8042 - use platform_driver_probe
Input: i8042 - use boolean type where it makes sense
Input: i8042 - try disabling and re-enabling AUX port at close
Input: pxa27x_keypad - allow modifying keymap from userspace
Input: sunkbd - fix formatting
Input: i8042 - bypass AUX IRQ delivery test on laptops
Input: wacom_w8001 - simplify querying logic
Input: atkbd - allow setting force-release bitmap via sysfs
Input: w90p910_keypad - move a dereference below a NULL test
Input: add twl4030_keypad driver
Input: matrix-keypad - add function to build device keymap
Input: tosakbd - fix cleaning up KEY_STROBEs after error
Input: joydev - validate axis/button maps before clobbering current ones
Input: xpad - add USB ID for the drumkit controller from Rock Band
Input: w90p910_keypad - rename driver name to match platform
Input: add new driver for Sentelic Finger Sensing Pad
Input: psmouse - allow defining read-only attributes
...
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r-- | drivers/input/mouse/alps.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 5547e2429fb..f36110689aa 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -279,7 +279,7 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int * subsequent commands. It looks like glidepad is behind stickpointer, * I'd thought it would be other way around... */ -static int alps_passthrough_mode(struct psmouse *psmouse, int enable) +static int alps_passthrough_mode(struct psmouse *psmouse, bool enable) { struct ps2dev *ps2dev = &psmouse->ps2dev; int cmd = enable ? PSMOUSE_CMD_SETSCALE21 : PSMOUSE_CMD_SETSCALE11; @@ -367,16 +367,16 @@ static int alps_poll(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; unsigned char buf[6]; - int poll_failed; + bool poll_failed; if (priv->i->flags & ALPS_PASS) - alps_passthrough_mode(psmouse, 1); + alps_passthrough_mode(psmouse, true); poll_failed = ps2_command(&psmouse->ps2dev, buf, PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0; if (priv->i->flags & ALPS_PASS) - alps_passthrough_mode(psmouse, 0); + alps_passthrough_mode(psmouse, false); if (poll_failed || (buf[0] & priv->i->mask0) != priv->i->byte0) return -1; @@ -401,10 +401,12 @@ static int alps_hw_init(struct psmouse *psmouse, int *version) if (!priv->i) return -1; - if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 1)) + if ((priv->i->flags & ALPS_PASS) && + alps_passthrough_mode(psmouse, true)) { return -1; + } - if (alps_tap_mode(psmouse, 1)) { + if (alps_tap_mode(psmouse, true)) { printk(KERN_WARNING "alps.c: Failed to enable hardware tapping\n"); return -1; } @@ -414,8 +416,10 @@ static int alps_hw_init(struct psmouse *psmouse, int *version) return -1; } - if ((priv->i->flags & ALPS_PASS) && alps_passthrough_mode(psmouse, 0)) + if ((priv->i->flags & ALPS_PASS) && + alps_passthrough_mode(psmouse, false)) { return -1; + } /* ALPS needs stream mode, otherwise it won't report any data */ if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSTREAM)) { @@ -519,7 +523,7 @@ init_fail: return -1; } -int alps_detect(struct psmouse *psmouse, int set_properties) +int alps_detect(struct psmouse *psmouse, bool set_properties) { int version; const struct alps_model_info *model; |