Commit c0f82d57 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: USB devices - 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: default avatarDmitry Torokhov <dtor@mail.ru>
parent 469ba4df
...@@ -185,7 +185,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ ...@@ -185,7 +185,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
input_dev->name = acecad->name; input_dev->name = acecad->name;
input_dev->phys = acecad->phys; input_dev->phys = acecad->phys;
usb_to_input_id(dev, &input_dev->id); usb_to_input_id(dev, &input_dev->id);
input_dev->cdev.dev = &intf->dev; input_dev->dev.parent = &intf->dev;
input_set_drvdata(input_dev, acecad); input_set_drvdata(input_dev, acecad);
......
...@@ -2044,7 +2044,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -2044,7 +2044,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
inputdev->name = "Aiptek"; inputdev->name = "Aiptek";
inputdev->phys = aiptek->features.usbPath; inputdev->phys = aiptek->features.usbPath;
usb_to_input_id(usbdev, &inputdev->id); usb_to_input_id(usbdev, &inputdev->id);
inputdev->cdev.dev = &intf->dev; inputdev->dev.parent = &intf->dev;
input_set_drvdata(inputdev, aiptek); input_set_drvdata(inputdev, aiptek);
......
...@@ -584,7 +584,7 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id ...@@ -584,7 +584,7 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
input_dev->name = "appletouch"; input_dev->name = "appletouch";
input_dev->phys = dev->phys; input_dev->phys = dev->phys;
usb_to_input_id(dev->udev, &input_dev->id); usb_to_input_id(dev->udev, &input_dev->id);
input_dev->cdev.dev = &iface->dev; input_dev->dev.parent = &iface->dev;
input_set_drvdata(input_dev, dev); input_set_drvdata(input_dev, dev);
......
...@@ -662,7 +662,7 @@ static void ati_remote_input_init(struct ati_remote *ati_remote) ...@@ -662,7 +662,7 @@ static void ati_remote_input_init(struct ati_remote *ati_remote)
idev->phys = ati_remote->phys; idev->phys = ati_remote->phys;
usb_to_input_id(ati_remote->udev, &idev->id); usb_to_input_id(ati_remote->udev, &idev->id);
idev->cdev.dev = &ati_remote->udev->dev; idev->dev.parent = &ati_remote->udev->dev;
} }
static int ati_remote_initialize(struct ati_remote *ati_remote) static int ati_remote_initialize(struct ati_remote *ati_remote)
......
...@@ -362,7 +362,7 @@ static int ati_remote2_input_init(struct ati_remote2 *ar2) ...@@ -362,7 +362,7 @@ static int ati_remote2_input_init(struct ati_remote2 *ar2)
idev->phys = ar2->phys; idev->phys = ar2->phys;
usb_to_input_id(ar2->udev, &idev->id); usb_to_input_id(ar2->udev, &idev->id);
idev->cdev.dev = &ar2->udev->dev; idev->dev.parent = &ar2->udev->dev;
retval = input_register_device(idev); retval = input_register_device(idev);
if (retval) if (retval)
......
...@@ -952,7 +952,7 @@ static int gtco_probe(struct usb_interface *usbinterface, ...@@ -952,7 +952,7 @@ static int gtco_probe(struct usb_interface *usbinterface,
/* Set input device required ID information */ /* Set input device required ID information */
usb_to_input_id(gtco->usbdev, &input_dev->id); usb_to_input_id(gtco->usbdev, &input_dev->id);
input_dev->cdev.dev = &usbinterface->dev; input_dev->dev.parent = &usbinterface->dev;
/* Setup the URB, it will be posted later on open of input device */ /* Setup the URB, it will be posted later on open of input device */
endpoint = &usbinterface->altsetting[0].endpoint[0].desc; endpoint = &usbinterface->altsetting[0].endpoint[0].desc;
......
...@@ -146,7 +146,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i ...@@ -146,7 +146,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
input_dev->name = "KB Gear Tablet"; input_dev->name = "KB Gear Tablet";
input_dev->phys = kbtab->phys; input_dev->phys = kbtab->phys;
usb_to_input_id(dev, &input_dev->id); usb_to_input_id(dev, &input_dev->id);
input_dev->cdev.dev = &intf->dev; input_dev->dev.parent = &intf->dev;
input_set_drvdata(input_dev, kbtab); input_set_drvdata(input_dev, kbtab);
......
...@@ -495,7 +495,7 @@ static int keyspan_probe(struct usb_interface *interface, const struct usb_devic ...@@ -495,7 +495,7 @@ static int keyspan_probe(struct usb_interface *interface, const struct usb_devic
input_dev->name = remote->name; input_dev->name = remote->name;
input_dev->phys = remote->phys; input_dev->phys = remote->phys;
usb_to_input_id(udev, &input_dev->id); usb_to_input_id(udev, &input_dev->id);
input_dev->cdev.dev = &interface->dev; input_dev->dev.parent = &interface->dev;
input_dev->evbit[0] = BIT(EV_KEY); /* We will only report KEY events. */ input_dev->evbit[0] = BIT(EV_KEY); /* We will only report KEY events. */
for (i = 0; i < ARRAY_SIZE(keyspan_key_table); i++) for (i = 0; i < ARRAY_SIZE(keyspan_key_table); i++)
......
...@@ -359,7 +359,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i ...@@ -359,7 +359,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
input_dev->phys = pm->phys; input_dev->phys = pm->phys;
usb_to_input_id(udev, &input_dev->id); usb_to_input_id(udev, &input_dev->id);
input_dev->cdev.dev = &intf->dev; input_dev->dev.parent = &intf->dev;
input_set_drvdata(input_dev, pm); input_set_drvdata(input_dev, pm);
......
...@@ -740,7 +740,7 @@ static int usbtouch_probe(struct usb_interface *intf, ...@@ -740,7 +740,7 @@ static int usbtouch_probe(struct usb_interface *intf,
input_dev->name = usbtouch->name; input_dev->name = usbtouch->name;
input_dev->phys = usbtouch->phys; input_dev->phys = usbtouch->phys;
usb_to_input_id(udev, &input_dev->id); usb_to_input_id(udev, &input_dev->id);
input_dev->cdev.dev = &intf->dev; input_dev->dev.parent = &intf->dev;
input_set_drvdata(input_dev, usbtouch); input_set_drvdata(input_dev, usbtouch);
......
...@@ -230,7 +230,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i ...@@ -230,7 +230,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
wacom->wacom_wac = wacom_wac; wacom->wacom_wac = wacom_wac;
usb_to_input_id(dev, &input_dev->id); usb_to_input_id(dev, &input_dev->id);
input_dev->cdev.dev = &intf->dev; input_dev->dev.parent = &intf->dev;
input_set_drvdata(input_dev, wacom); input_set_drvdata(input_dev, wacom);
......
...@@ -345,7 +345,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id ...@@ -345,7 +345,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
input_dev->name = xpad_device[i].name; input_dev->name = xpad_device[i].name;
input_dev->phys = xpad->phys; input_dev->phys = xpad->phys;
usb_to_input_id(udev, &input_dev->id); usb_to_input_id(udev, &input_dev->id);
input_dev->cdev.dev = &intf->dev; input_dev->dev.parent = &intf->dev;
input_set_drvdata(input_dev, xpad); input_set_drvdata(input_dev, xpad);
......
...@@ -937,7 +937,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -937,7 +937,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
input_dev->name = nfo->name; input_dev->name = nfo->name;
input_dev->phys = yld->phys; input_dev->phys = yld->phys;
usb_to_input_id(udev, &input_dev->id); usb_to_input_id(udev, &input_dev->id);
input_dev->cdev.dev = &intf->dev; input_dev->dev.parent = &intf->dev;
input_set_drvdata(input_dev, yld); input_set_drvdata(input_dev, yld);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment