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/lifebook.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/lifebook.c')
-rw-r--r-- | drivers/input/mouse/lifebook.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index bd9df9b28325..55991424ac91 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
@@ -34,7 +34,7 @@ static struct dmi_system_id lifebook_dmi_table[] = { | |||
34 | static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse, struct pt_regs *regs) | 34 | static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse, struct pt_regs *regs) |
35 | { | 35 | { |
36 | unsigned char *packet = psmouse->packet; | 36 | unsigned char *packet = psmouse->packet; |
37 | struct input_dev *dev = &psmouse->dev; | 37 | struct input_dev *dev = psmouse->dev; |
38 | 38 | ||
39 | if (psmouse->pktcnt != 3) | 39 | if (psmouse->pktcnt != 3) |
40 | return PSMOUSE_GOOD_DATA; | 40 | return PSMOUSE_GOOD_DATA; |
@@ -113,15 +113,17 @@ int lifebook_detect(struct psmouse *psmouse, int set_properties) | |||
113 | 113 | ||
114 | int lifebook_init(struct psmouse *psmouse) | 114 | int lifebook_init(struct psmouse *psmouse) |
115 | { | 115 | { |
116 | struct input_dev *input_dev = psmouse->dev; | ||
117 | |||
116 | if (lifebook_absolute_mode(psmouse)) | 118 | if (lifebook_absolute_mode(psmouse)) |
117 | return -1; | 119 | return -1; |
118 | 120 | ||
119 | psmouse->dev.evbit[0] = BIT(EV_ABS) | BIT(EV_KEY) | BIT(EV_REL); | 121 | input_dev->evbit[0] = BIT(EV_ABS) | BIT(EV_KEY) | BIT(EV_REL); |
120 | psmouse->dev.keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); | 122 | input_dev->keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); |
121 | psmouse->dev.keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 123 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
122 | psmouse->dev.relbit[0] = BIT(REL_X) | BIT(REL_Y); | 124 | input_dev->relbit[0] = BIT(REL_X) | BIT(REL_Y); |
123 | input_set_abs_params(&psmouse->dev, ABS_X, 0, 1024, 0, 0); | 125 | input_set_abs_params(input_dev, ABS_X, 0, 1024, 0, 0); |
124 | input_set_abs_params(&psmouse->dev, ABS_Y, 0, 1024, 0, 0); | 126 | input_set_abs_params(input_dev, ABS_Y, 0, 1024, 0, 0); |
125 | 127 | ||
126 | psmouse->protocol_handler = lifebook_process_byte; | 128 | psmouse->protocol_handler = lifebook_process_byte; |
127 | psmouse->set_resolution = lifebook_set_resolution; | 129 | psmouse->set_resolution = lifebook_set_resolution; |