Commit a152252f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB input drivers: remove direct calls to dev_set* and dev_get*

change dev_set_drvdata() and dev_get_drvdata() to
usb_set_intfdata() and usb_get_intfdata()
parent 5b2397fd
......@@ -330,16 +330,16 @@ aiptek_probe(struct usb_interface *intf,
printk(KERN_INFO "input: %s on usb%d:%d\n",
aiptek->features->name, dev->bus->busnum, dev->devnum);
dev_set_drvdata(&intf->dev, aiptek);
usb_set_intfdata(intf, aiptek);
return 0;
}
static void
aiptek_disconnect(struct usb_interface *intf)
{
struct aiptek *aiptek = dev_get_drvdata(&intf->dev);
struct aiptek *aiptek = usb_get_intfdata (intf);
dev_set_drvdata(&intf->dev, NULL);
usb_set_intfdata(intf, NULL);
if (aiptek) {
usb_unlink_urb(aiptek->irq);
input_unregister_device(&aiptek->dev);
......
......@@ -1545,12 +1545,12 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
static void hid_disconnect(struct usb_interface *intf)
{
struct hid_device *hid = dev_get_drvdata(&intf->dev);
struct hid_device *hid = usb_get_intfdata (intf);
if (!hid)
return;
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata(intf, NULL);
usb_unlink_urb(hid->urbin);
usb_unlink_urb(hid->urbout);
usb_unlink_urb(hid->urbctrl);
......@@ -1592,7 +1592,7 @@ static int hid_probe (struct usb_interface *intf, const struct usb_device_id *id
if (!hiddev_connect(hid))
hid->claimed |= HID_CLAIMED_HIDDEV;
dev_set_drvdata(&intf->dev, hid);
usb_set_intfdata(intf, hid);
if (!hid->claimed) {
printk ("HID device not claimed by input or hiddev\n");
......
......@@ -388,16 +388,16 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
pm->requires_update = UPDATE_PULSE_ASLEEP | UPDATE_PULSE_AWAKE | UPDATE_PULSE_MODE | UPDATE_STATIC_BRIGHTNESS;
powermate_pulse_led(pm, 0x80, 255, 0, 1, 0); // set default pulse parameters
dev_set_drvdata(&intf->dev, pm);
usb_set_intfdata(intf, pm);
return 0;
}
/* Called when a USB device we've accepted ownership of is removed */
static void powermate_disconnect(struct usb_interface *intf)
{
struct powermate_device *pm = dev_get_drvdata(&intf->dev);
struct powermate_device *pm = usb_get_intfdata (intf);
dev_set_drvdata(&intf->dev, NULL);
usb_set_intfdata(intf, NULL);
if (pm) {
down(&pm->lock);
pm->requires_update = 0;
......
......@@ -328,15 +328,15 @@ static int usb_kbd_probe(struct usb_interface *iface,
printk(KERN_INFO "input: %s on %s\n", kbd->name, path);
dev_set_drvdata(&iface->dev, kbd);
usb_set_intfdata(iface, kbd);
return 0;
}
static void usb_kbd_disconnect(struct usb_interface *intf)
{
struct usb_kbd *kbd = dev_get_drvdata(&intf->dev);
struct usb_kbd *kbd = usb_get_intfdata (intf);
dev_set_drvdata(&intf->dev, NULL);
usb_set_intfdata(intf, NULL);
if (kbd) {
usb_unlink_urb(kbd->irq);
input_unregister_device(&kbd->dev);
......
......@@ -211,15 +211,15 @@ static int usb_mouse_probe(struct usb_interface * intf, const struct usb_device_
input_register_device(&mouse->dev);
printk(KERN_INFO "input: %s on %s\n", mouse->name, path);
dev_set_drvdata(&intf->dev, mouse);
usb_set_intfdata(intf, mouse);
return 0;
}
static void usb_mouse_disconnect(struct usb_interface *intf)
{
struct usb_mouse *mouse = dev_get_drvdata(&intf->dev);
struct usb_mouse *mouse = usb_get_intfdata (intf);
dev_set_drvdata(&intf->dev, NULL);
usb_set_intfdata(intf, NULL);
if (mouse) {
usb_unlink_urb(mouse->irq);
input_unregister_device(&mouse->dev);
......
......@@ -583,16 +583,16 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
printk(KERN_INFO "input: %s on %s\n", wacom->features->name, path);
dev_set_drvdata(&intf->dev, wacom);
usb_set_intfdata(intf, wacom);
return 0;
}
static void wacom_disconnect(struct usb_interface *intf)
{
struct wacom *wacom = dev_get_drvdata(&intf->dev);
struct wacom *wacom = usb_get_intfdata (intf);
dev_set_drvdata(&intf->dev, NULL);
usb_set_intfdata(intf, NULL);
if (wacom) {
usb_unlink_urb(wacom->irq);
input_unregister_device(&wacom->dev);
......
......@@ -311,15 +311,15 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
printk(KERN_INFO "input: %s on %s", xpad->dev.name, path);
dev_set_drvdata(&intf->dev, xpad);
usb_set_intfdata(intf, xpad);
return 0;
}
static void xpad_disconnect(struct usb_interface *intf)
{
struct usb_xpad *xpad = dev_get_drvdata(&intf->dev);
struct usb_xpad *xpad = usb_get_intfdata (intf);
dev_set_drvdata(&intf->dev, NULL);
usb_set_intfdata(intf, NULL);
if (xpad) {
usb_unlink_urb(xpad->irq_in);
input_unregister_device(&xpad->dev);
......
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