[PATCH 6/39] input: Pass psmouse_extensions as a parameter
From: Vojtech Pavlik
Date: Mon Jun 07 2004 - 07:47:15 EST
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input-for-linus
===================================================================
ChangeSet@xxxxxxxxxxxxx, 2004-04-23 02:33:04-05:00, dtor_core@xxxxxxxxxxxxx
Input: pass maximum allowed protocol to psmouse_extensions instead of
accessing psmouse_max_proto directly allowing to avoid changing
the global parameter when synaptics initialization fails
psmouse-base.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
===================================================================
diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
--- a/drivers/input/mouse/psmouse-base.c 2004-06-07 13:13:21 +02:00
+++ b/drivers/input/mouse/psmouse-base.c 2004-06-07 13:13:21 +02:00
@@ -363,7 +363,7 @@
* the mouse may have.
*/
-static int psmouse_extensions(struct psmouse *psmouse)
+static int psmouse_extensions(struct psmouse *psmouse, unsigned int max_proto)
{
int synaptics_hardware = 0;
@@ -374,12 +374,12 @@
/*
* Try Synaptics TouchPad
*/
- if (psmouse_max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse)) {
+ if (max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse)) {
synaptics_hardware = 1;
psmouse->vendor = "Synaptics";
psmouse->name = "TouchPad";
- if (psmouse_max_proto > PSMOUSE_IMEX) {
+ if (max_proto > PSMOUSE_IMEX) {
if (synaptics_init(psmouse) == 0)
return PSMOUSE_SYNAPTICS;
/*
@@ -387,7 +387,7 @@
* Unfortunately Logitech/Genius probes confuse some firmware versions so
* we'll have to skip them.
*/
- psmouse_max_proto = PSMOUSE_IMEX;
+ max_proto = PSMOUSE_IMEX;
}
/*
* Make sure that touchpad is in relative mode, gestures (taps) are enabled
@@ -395,7 +395,7 @@
synaptics_reset(psmouse);
}
- if (psmouse_max_proto > PSMOUSE_IMEX && genius_detect(psmouse)) {
+ if (max_proto > PSMOUSE_IMEX && genius_detect(psmouse)) {
set_bit(BTN_EXTRA, psmouse->dev.keybit);
set_bit(BTN_SIDE, psmouse->dev.keybit);
set_bit(REL_WHEEL, psmouse->dev.relbit);
@@ -405,17 +405,16 @@
return PSMOUSE_GENPS;
}
- if (psmouse_max_proto > PSMOUSE_IMEX) {
+ if (max_proto > PSMOUSE_IMEX) {
int type = ps2pp_detect(psmouse);
if (type)
return type;
}
- if (psmouse_max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse)) {
+ if (max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse)) {
set_bit(REL_WHEEL, psmouse->dev.relbit);
- if (psmouse_max_proto >= PSMOUSE_IMEX &&
- im_explorer_detect(psmouse)) {
+ if (max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse)) {
set_bit(BTN_SIDE, psmouse->dev.keybit);
set_bit(BTN_EXTRA, psmouse->dev.keybit);
@@ -478,7 +477,7 @@
* basic PS/2 3-button mouse.
*/
- return psmouse->type = psmouse_extensions(psmouse);
+ return psmouse->type = psmouse_extensions(psmouse, psmouse_max_proto);
}
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/