Commit d02ba476 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/vojtech/input

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents f5c49d6f b6f50797
......@@ -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)) {
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment