diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-09 04:17:31 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-05-09 04:17:31 -0400 |
commit | e071298589418076ef0a9813677f2d7032b65baa (patch) | |
tree | 1ec366c95456511dc0820aed22b333caf89e0a2d /drivers/hid/usbhid/usbmouse.c | |
parent | fed76ab3b206bd0c5a9e3be17cead0a22d7593c5 (diff) |
HID: switch to using input_dev->dev.parent
In preparation for struct class_device -> struct device input
core conversion switch to using input_dev->dev.parent when
specifying device position in sysfs tree.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/usbmouse.c')
-rw-r--r-- | drivers/hid/usbhid/usbmouse.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/hid/usbhid/usbmouse.c b/drivers/hid/usbhid/usbmouse.c index 573776d865e1..5345c73bcf62 100644 --- a/drivers/hid/usbhid/usbmouse.c +++ b/drivers/hid/usbhid/usbmouse.c | |||
@@ -96,7 +96,7 @@ resubmit: | |||
96 | 96 | ||
97 | static int usb_mouse_open(struct input_dev *dev) | 97 | static int usb_mouse_open(struct input_dev *dev) |
98 | { | 98 | { |
99 | struct usb_mouse *mouse = dev->private; | 99 | struct usb_mouse *mouse = input_get_drvdata(dev); |
100 | 100 | ||
101 | mouse->irq->dev = mouse->usbdev; | 101 | mouse->irq->dev = mouse->usbdev; |
102 | if (usb_submit_urb(mouse->irq, GFP_KERNEL)) | 102 | if (usb_submit_urb(mouse->irq, GFP_KERNEL)) |
@@ -107,7 +107,7 @@ static int usb_mouse_open(struct input_dev *dev) | |||
107 | 107 | ||
108 | static void usb_mouse_close(struct input_dev *dev) | 108 | static void usb_mouse_close(struct input_dev *dev) |
109 | { | 109 | { |
110 | struct usb_mouse *mouse = dev->private; | 110 | struct usb_mouse *mouse = input_get_drvdata(dev); |
111 | 111 | ||
112 | usb_kill_urb(mouse->irq); | 112 | usb_kill_urb(mouse->irq); |
113 | } | 113 | } |
@@ -171,7 +171,7 @@ static int usb_mouse_probe(struct usb_interface *intf, const struct usb_device_i | |||
171 | input_dev->name = mouse->name; | 171 | input_dev->name = mouse->name; |
172 | input_dev->phys = mouse->phys; | 172 | input_dev->phys = mouse->phys; |
173 | usb_to_input_id(dev, &input_dev->id); | 173 | usb_to_input_id(dev, &input_dev->id); |
174 | input_dev->cdev.dev = &intf->dev; | 174 | input_dev->dev.parent = &intf->dev; |
175 | 175 | ||
176 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | 176 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL); |
177 | input_dev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); | 177 | input_dev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE); |
@@ -179,7 +179,8 @@ static int usb_mouse_probe(struct usb_interface *intf, const struct usb_device_i | |||
179 | input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_SIDE) | BIT(BTN_EXTRA); | 179 | input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_SIDE) | BIT(BTN_EXTRA); |
180 | input_dev->relbit[0] |= BIT(REL_WHEEL); | 180 | input_dev->relbit[0] |= BIT(REL_WHEEL); |
181 | 181 | ||
182 | input_dev->private = mouse; | 182 | input_set_drvdata(input_dev, mouse); |
183 | |||
183 | input_dev->open = usb_mouse_open; | 184 | input_dev->open = usb_mouse_open; |
184 | input_dev->close = usb_mouse_close; | 185 | input_dev->close = usb_mouse_close; |
185 | 186 | ||