From 8818e4190f0e04ad20a30e7488dcdd3029b4b96d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:32:53 -0700 Subject: [PATCH] USB: input: xpad.c: fix up dev_* messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 CC: "Magnus Hörlin" CC: Rusty Russell CC: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/xpad.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 2e106b0..ee16fb6 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -252,6 +252,7 @@ MODULE_DEVICE_TABLE (usb, xpad_table); struct usb_xpad { struct input_dev *dev; /* input device interface */ struct usb_device *udev; /* usb device */ + struct usb_interface *intf; /* usb interface */ int pad_present; @@ -457,7 +458,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha static void xpad_irq_in(struct urb *urb) { struct usb_xpad *xpad = urb->context; - struct device *dev = &xpad->dev->dev; + struct device *dev = &xpad->intf->dev; int retval, status; status = urb->status; @@ -500,7 +501,7 @@ exit: static void xpad_bulk_out(struct urb *urb) { struct usb_xpad *xpad = urb->context; - struct device *dev = &xpad->dev->dev; + struct device *dev = &xpad->intf->dev; switch (urb->status) { case 0: @@ -523,7 +524,7 @@ static void xpad_bulk_out(struct urb *urb) static void xpad_irq_out(struct urb *urb) { struct usb_xpad *xpad = urb->context; - struct device *dev = &xpad->dev->dev; + struct device *dev = &xpad->intf->dev; int retval, status; status = urb->status; @@ -855,6 +856,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id } xpad->udev = udev; + xpad->intf = intf; xpad->mapping = xpad_device[i].mapping; xpad->xtype = xpad_device[i].xtype; -- 2.7.4