[PATCH] Wrap all protocols except for synaptics w/ ifdefs

From: Andres Salomon
Date: Tue Dec 26 2006 - 16:50:47 EST


This patch allows ALPS, LOGIPS2PP, LIFEBOOK, and TRACKPOINT protocol
extensions to be disabled during compilation. The synaptics stuff is left
alone for now, since it needs special handling for synaptic pass-through
ports.

Signed-off-by: Andres Salomon <dilinger@xxxxxxxxxx>
---
drivers/input/mouse/psmouse-base.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index a0e4a03..6b3ac9d 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -555,6 +555,7 @@ static int psmouse_extensions(struct psm
{
int synaptics_hardware = 0;

+#ifdef CONFIG_MOUSE_PS2_LIFEBOOK
/*
* We always check for lifebook because it does not disturb mouse
* (it only checks DMI information).
@@ -565,6 +566,7 @@ static int psmouse_extensions(struct psm
return PSMOUSE_LIFEBOOK;
}
}
+#endif

/*
* Try Kensington ThinkingMouse (we try first, because synaptics probe
@@ -596,6 +598,7 @@ static int psmouse_extensions(struct psm
synaptics_reset(psmouse);
}

+#ifdef CONFIG_MOUSE_PS2_ALPS
/*
* Try ALPS TouchPad
*/
@@ -610,15 +613,20 @@ static int psmouse_extensions(struct psm
max_proto = PSMOUSE_IMEX;
}
}
+#endif

if (max_proto > PSMOUSE_IMEX && genius_detect(psmouse, set_properties) == 0)
return PSMOUSE_GENPS;

+#ifdef CONFIG_MOUSE_PS2_LOGIPS2PP
if (max_proto > PSMOUSE_IMEX && ps2pp_init(psmouse, set_properties) == 0)
return PSMOUSE_PS2PP;
+#endif

+#ifdef CONFIG_MOUSE_PS2_TRACKPOINT
if (max_proto > PSMOUSE_IMEX && trackpoint_detect(psmouse, set_properties) == 0)
return PSMOUSE_TRACKPOINT;
+#endif

/*
* Reset to defaults in case the device got confused by extended
@@ -660,12 +668,14 @@ static const struct psmouse_protocol psm
.maxproto = 1,
.detect = ps2bare_detect,
},
+#ifdef CONFIG_MOUSE_PS2_LOGIPS2PP
{
.type = PSMOUSE_PS2PP,
.name = "PS2++",
.alias = "logitech",
.detect = ps2pp_init,
},
+#endif
{
.type = PSMOUSE_THINKPS,
.name = "ThinkPS/2",
@@ -699,6 +709,7 @@ static const struct psmouse_protocol psm
.detect = synaptics_detect,
.init = synaptics_init,
},
+#ifdef CONFIG_MOUSE_PS2_ALPS
{
.type = PSMOUSE_ALPS,
.name = "AlpsPS/2",
@@ -706,18 +717,23 @@ static const struct psmouse_protocol psm
.detect = alps_detect,
.init = alps_init,
},
+#endif
+#ifdef CONFIG_MOUSE_PS2_LIFEBOOK
{
.type = PSMOUSE_LIFEBOOK,
.name = "LBPS/2",
.alias = "lifebook",
.init = lifebook_init,
},
+#endif
+#ifdef CONFIG_MOUSE_PS2_TRACKPOINT
{
.type = PSMOUSE_TRACKPOINT,
.name = "TPPS/2",
.alias = "trackpoint",
.detect = trackpoint_detect,
},
+#endif
{
.type = PSMOUSE_AUTO,
.name = "auto",
--
1.4.1


--------------090507080508080503020001--
-
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/