diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-04 18:32:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-04 18:32:53 -0400 |
commit | 8818e4190f0e04ad20a30e7488dcdd3029b4b96d (patch) | |
tree | b821cc897e0f9fd14585f10b16c0a8dd5b3fdbff /drivers/input/joystick | |
parent | a852d78e4e24f2200fa1764ca3366b4fa4fd072a (diff) |
USB: input: xpad.c: fix up dev_* messages
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to. So converted it to use that instead.
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: "Magnus Hörlin" <magnus@alefors.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/xpad.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 2e106b0796ce..ee16fb67b7ae 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -252,6 +252,7 @@ MODULE_DEVICE_TABLE (usb, xpad_table); | |||
252 | struct usb_xpad { | 252 | struct usb_xpad { |
253 | struct input_dev *dev; /* input device interface */ | 253 | struct input_dev *dev; /* input device interface */ |
254 | struct usb_device *udev; /* usb device */ | 254 | struct usb_device *udev; /* usb device */ |
255 | struct usb_interface *intf; /* usb interface */ | ||
255 | 256 | ||
256 | int pad_present; | 257 | int pad_present; |
257 | 258 | ||
@@ -457,7 +458,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha | |||
457 | static void xpad_irq_in(struct urb *urb) | 458 | static void xpad_irq_in(struct urb *urb) |
458 | { | 459 | { |
459 | struct usb_xpad *xpad = urb->context; | 460 | struct usb_xpad *xpad = urb->context; |
460 | struct device *dev = &xpad->dev->dev; | 461 | struct device *dev = &xpad->intf->dev; |
461 | int retval, status; | 462 | int retval, status; |
462 | 463 | ||
463 | status = urb->status; | 464 | status = urb->status; |
@@ -500,7 +501,7 @@ exit: | |||
500 | static void xpad_bulk_out(struct urb *urb) | 501 | static void xpad_bulk_out(struct urb *urb) |
501 | { | 502 | { |
502 | struct usb_xpad *xpad = urb->context; | 503 | struct usb_xpad *xpad = urb->context; |
503 | struct device *dev = &xpad->dev->dev; | 504 | struct device *dev = &xpad->intf->dev; |
504 | 505 | ||
505 | switch (urb->status) { | 506 | switch (urb->status) { |
506 | case 0: | 507 | case 0: |
@@ -523,7 +524,7 @@ static void xpad_bulk_out(struct urb *urb) | |||
523 | static void xpad_irq_out(struct urb *urb) | 524 | static void xpad_irq_out(struct urb *urb) |
524 | { | 525 | { |
525 | struct usb_xpad *xpad = urb->context; | 526 | struct usb_xpad *xpad = urb->context; |
526 | struct device *dev = &xpad->dev->dev; | 527 | struct device *dev = &xpad->intf->dev; |
527 | int retval, status; | 528 | int retval, status; |
528 | 529 | ||
529 | status = urb->status; | 530 | status = urb->status; |
@@ -855,6 +856,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id | |||
855 | } | 856 | } |
856 | 857 | ||
857 | xpad->udev = udev; | 858 | xpad->udev = udev; |
859 | xpad->intf = intf; | ||
858 | xpad->mapping = xpad_device[i].mapping; | 860 | xpad->mapping = xpad_device[i].mapping; |
859 | xpad->xtype = xpad_device[i].xtype; | 861 | xpad->xtype = xpad_device[i].xtype; |
860 | 862 | ||