diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-09-15 03:01:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 12:52:52 -0400 |
commit | 2e5b636bb5f8dacbb91d08544e2c41ebcad5dace (patch) | |
tree | 059a2078d7b11713cad4675a9d8a062337957102 /drivers/input/mouse/logips2pp.c | |
parent | d19fbe8a763634395d4bef40fc88cdb61c4a6274 (diff) |
[PATCH] drivers/input/mouse: convert to dynamic input_dev allocation
Input: convert drivers/input/mouse to dynamic input_dev allocation
This is required for input_dev sysfs integration
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input/mouse/logips2pp.c')
-rw-r--r-- | drivers/input/mouse/logips2pp.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index 7df96525222e..0f69ff46c1ae 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c | |||
@@ -40,7 +40,7 @@ struct ps2pp_info { | |||
40 | 40 | ||
41 | static psmouse_ret_t ps2pp_process_byte(struct psmouse *psmouse, struct pt_regs *regs) | 41 | static psmouse_ret_t ps2pp_process_byte(struct psmouse *psmouse, struct pt_regs *regs) |
42 | { | 42 | { |
43 | struct input_dev *dev = &psmouse->dev; | 43 | struct input_dev *dev = psmouse->dev; |
44 | unsigned char *packet = psmouse->packet; | 44 | unsigned char *packet = psmouse->packet; |
45 | 45 | ||
46 | if (psmouse->pktcnt < 3) | 46 | if (psmouse->pktcnt < 3) |
@@ -257,25 +257,27 @@ static struct ps2pp_info *get_model_info(unsigned char model) | |||
257 | static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_info *model_info, | 257 | static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_info *model_info, |
258 | int using_ps2pp) | 258 | int using_ps2pp) |
259 | { | 259 | { |
260 | struct input_dev *input_dev = psmouse->dev; | ||
261 | |||
260 | if (model_info->features & PS2PP_SIDE_BTN) | 262 | if (model_info->features & PS2PP_SIDE_BTN) |
261 | set_bit(BTN_SIDE, psmouse->dev.keybit); | 263 | set_bit(BTN_SIDE, input_dev->keybit); |
262 | 264 | ||
263 | if (model_info->features & PS2PP_EXTRA_BTN) | 265 | if (model_info->features & PS2PP_EXTRA_BTN) |
264 | set_bit(BTN_EXTRA, psmouse->dev.keybit); | 266 | set_bit(BTN_EXTRA, input_dev->keybit); |
265 | 267 | ||
266 | if (model_info->features & PS2PP_TASK_BTN) | 268 | if (model_info->features & PS2PP_TASK_BTN) |
267 | set_bit(BTN_TASK, psmouse->dev.keybit); | 269 | set_bit(BTN_TASK, input_dev->keybit); |
268 | 270 | ||
269 | if (model_info->features & PS2PP_NAV_BTN) { | 271 | if (model_info->features & PS2PP_NAV_BTN) { |
270 | set_bit(BTN_FORWARD, psmouse->dev.keybit); | 272 | set_bit(BTN_FORWARD, input_dev->keybit); |
271 | set_bit(BTN_BACK, psmouse->dev.keybit); | 273 | set_bit(BTN_BACK, input_dev->keybit); |
272 | } | 274 | } |
273 | 275 | ||
274 | if (model_info->features & PS2PP_WHEEL) | 276 | if (model_info->features & PS2PP_WHEEL) |
275 | set_bit(REL_WHEEL, psmouse->dev.relbit); | 277 | set_bit(REL_WHEEL, input_dev->relbit); |
276 | 278 | ||
277 | if (model_info->features & PS2PP_HWHEEL) | 279 | if (model_info->features & PS2PP_HWHEEL) |
278 | set_bit(REL_HWHEEL, psmouse->dev.relbit); | 280 | set_bit(REL_HWHEEL, input_dev->relbit); |
279 | 281 | ||
280 | switch (model_info->kind) { | 282 | switch (model_info->kind) { |
281 | case PS2PP_KIND_WHEEL: | 283 | case PS2PP_KIND_WHEEL: |
@@ -387,7 +389,7 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties) | |||
387 | } | 389 | } |
388 | 390 | ||
389 | if (buttons < 3) | 391 | if (buttons < 3) |
390 | clear_bit(BTN_MIDDLE, psmouse->dev.keybit); | 392 | clear_bit(BTN_MIDDLE, psmouse->dev->keybit); |
391 | 393 | ||
392 | if (model_info) | 394 | if (model_info) |
393 | ps2pp_set_model_properties(psmouse, model_info, use_ps2pp); | 395 | ps2pp_set_model_properties(psmouse, model_info, use_ps2pp); |