Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: input: iforce: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+7 -5
+2 -2
drivers/input/joystick/iforce/iforce-packets.c
··· 257 257 258 258 status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); 259 259 if (status) { 260 - dev_err(&iforce->dev->dev, 260 + dev_err(&iforce->intf->dev, 261 261 "usb_submit_urb failed %d\n", status); 262 262 return -1; 263 263 } ··· 266 266 iforce->ctrl->status != -EINPROGRESS, HZ); 267 267 268 268 if (iforce->ctrl->status) { 269 - dev_dbg(&iforce->dev->dev, 269 + dev_dbg(&iforce->intf->dev, 270 270 "iforce->ctrl->status = %d\n", 271 271 iforce->ctrl->status); 272 272 usb_unlink_urb(iforce->ctrl);
+4 -3
drivers/input/joystick/iforce/iforce-usb.c
··· 64 64 65 65 if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { 66 66 clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); 67 - dev_warn(&iforce->dev->dev, "usb_submit_urb failed %d\n", n); 67 + dev_warn(&iforce->intf->dev, "usb_submit_urb failed %d\n", n); 68 68 } 69 69 70 70 /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended. ··· 76 76 static void iforce_usb_irq(struct urb *urb) 77 77 { 78 78 struct iforce *iforce = urb->context; 79 - struct device *dev = &iforce->dev->dev; 79 + struct device *dev = &iforce->intf->dev; 80 80 int status; 81 81 82 82 switch (urb->status) { ··· 112 112 113 113 if (urb->status) { 114 114 clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); 115 - dev_dbg(&iforce->dev->dev, "urb->status %d, exiting\n", 115 + dev_dbg(&iforce->intf->dev, "urb->status %d, exiting\n", 116 116 urb->status); 117 117 return; 118 118 } ··· 158 158 159 159 iforce->bus = IFORCE_USB; 160 160 iforce->usbdev = dev; 161 + iforce->intf = intf; 161 162 162 163 iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; 163 164 iforce->cr.wIndex = 0;
+1
drivers/input/joystick/iforce/iforce.h
··· 115 115 #endif 116 116 #ifdef CONFIG_JOYSTICK_IFORCE_USB 117 117 struct usb_device *usbdev; /* USB transfer */ 118 + struct usb_interface *intf; 118 119 struct urb *irq, *out, *ctrl; 119 120 struct usb_ctrlrequest cr; 120 121 #endif