Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 22:13:04 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 22:13:04 -0800
commitd02ba476e527264e0ad869e25ec33d141ac01277 (patch)
tree1af3633127af5914a8cf1074143dd078cbec9a5c
parentf5c49d6fe76b01a9d16fb2f6bf74575e4f82d87b (diff)
parentb6f507979d72ac455ecbd24709c3e3484992c0c8 (diff)
Merge bk://kernel.bkbits.net/vojtech/input
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-rw-r--r--drivers/input/keyboard/atkbd.c8
-rw-r--r--drivers/input/mouse/logips2pp.c15
2 files changed, 17 insertions, 6 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index b1ca1528b7e6..0d3aac5e0b64 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -756,6 +756,10 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd)
set_bit(BTN_MIDDLE, atkbd->dev.keybit);
}
+ atkbd->dev.keycode = atkbd->keycode;
+ atkbd->dev.keycodesize = sizeof(unsigned char);
+ atkbd->dev.keycodemax = ARRAY_SIZE(atkbd_set2_keycode);
+
for (i = 0; i < 512; i++)
if (atkbd->keycode[i] && atkbd->keycode[i] < ATKBD_SPECIAL)
set_bit(atkbd->keycode[i], atkbd->dev.keybit);
@@ -804,10 +808,6 @@ static void atkbd_connect(struct serio *serio, struct serio_driver *drv)
if (atkbd->softrepeat)
atkbd->softraw = 1;
- atkbd->dev.keycode = atkbd->keycode;
- atkbd->dev.keycodesize = sizeof(unsigned char);
- atkbd->dev.keycodemax = ARRAY_SIZE(atkbd_set2_keycode);
-
serio->private = atkbd;
if (serio_open(serio, drv)) {
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c
index f1b1be3e1ca2..9c8f65917824 100644
--- a/drivers/input/mouse/logips2pp.c
+++ b/drivers/input/mouse/logips2pp.c
@@ -245,7 +245,8 @@ static struct ps2pp_info *get_model_info(unsigned char model)
* Set up input device's properties based on the detected mouse model.
*/
-static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_info *model_info)
+static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_info *model_info,
+ int using_ps2pp)
{
if (model_info->features & PS2PP_SIDE_BTN)
set_bit(BTN_SIDE, psmouse->dev.keybit);
@@ -279,6 +280,16 @@ static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_inf
case PS2PP_KIND_TP3:
psmouse->name = "TouchPad 3";
break;
+
+ default:
+ /*
+ * Set name to "Mouse" only when using PS2++,
+ * otherwise let other protocols define suitable
+ * name
+ */
+ if (using_ps2pp)
+ psmouse->name = "Mouse";
+ break;
}
}
@@ -371,7 +382,7 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties)
clear_bit(BTN_RIGHT, psmouse->dev.keybit);
if (model_info)
- ps2pp_set_model_properties(psmouse, model_info);
+ ps2pp_set_model_properties(psmouse, model_info, use_ps2pp);
}
return use_ps2pp ? 0 : -1;