aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/lifebook.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/lifebook.c')
-rw-r--r--drivers/input/mouse/lifebook.c16
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[] = {
34static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse, struct pt_regs *regs) 34static 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
114int lifebook_init(struct psmouse *psmouse) 114int 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;