aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-05-08 00:31:30 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-23 02:45:50 -0400
commit09b7002d68cfa1c45cc413a0c7cca399c25a57c6 (patch)
treee5fbb5f3bd3c537548eeef4d401bab1247299e02 /drivers/usb/storage
parent57a21c1b929450b1e020c0a03cca6fa7448f4222 (diff)
USB: Onetouch - 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. Also, do not access input_dev->private directly, use helpers. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/onetouch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c
index 6d3dad3d1dae..d35369392fed 100644
--- a/drivers/usb/storage/onetouch.c
+++ b/drivers/usb/storage/onetouch.c
@@ -84,7 +84,7 @@ resubmit:
84 84
85static int usb_onetouch_open(struct input_dev *dev) 85static int usb_onetouch_open(struct input_dev *dev)
86{ 86{
87 struct usb_onetouch *onetouch = dev->private; 87 struct usb_onetouch *onetouch = input_get_drvdata(dev);
88 88
89 onetouch->is_open = 1; 89 onetouch->is_open = 1;
90 onetouch->irq->dev = onetouch->udev; 90 onetouch->irq->dev = onetouch->udev;
@@ -98,7 +98,7 @@ static int usb_onetouch_open(struct input_dev *dev)
98 98
99static void usb_onetouch_close(struct input_dev *dev) 99static void usb_onetouch_close(struct input_dev *dev)
100{ 100{
101 struct usb_onetouch *onetouch = dev->private; 101 struct usb_onetouch *onetouch = input_get_drvdata(dev);
102 102
103 usb_kill_urb(onetouch->irq); 103 usb_kill_urb(onetouch->irq);
104 onetouch->is_open = 0; 104 onetouch->is_open = 0;
@@ -185,13 +185,14 @@ int onetouch_connect_input(struct us_data *ss)
185 input_dev->name = onetouch->name; 185 input_dev->name = onetouch->name;
186 input_dev->phys = onetouch->phys; 186 input_dev->phys = onetouch->phys;
187 usb_to_input_id(udev, &input_dev->id); 187 usb_to_input_id(udev, &input_dev->id);
188 input_dev->cdev.dev = &udev->dev; 188 input_dev->dev.parent = &udev->dev;
189 189
190 set_bit(EV_KEY, input_dev->evbit); 190 set_bit(EV_KEY, input_dev->evbit);
191 set_bit(ONETOUCH_BUTTON, input_dev->keybit); 191 set_bit(ONETOUCH_BUTTON, input_dev->keybit);
192 clear_bit(0, input_dev->keybit); 192 clear_bit(0, input_dev->keybit);
193 193
194 input_dev->private = onetouch; 194 input_set_drvdata(input_dev, onetouch);
195
195 input_dev->open = usb_onetouch_open; 196 input_dev->open = usb_onetouch_open;
196 input_dev->close = usb_onetouch_close; 197 input_dev->close = usb_onetouch_close;
197 198