aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-04 18:23:04 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-04 18:23:04 -0400
commita852d78e4e24f2200fa1764ca3366b4fa4fd072a (patch)
tree95d727c5ce1fa082c3e40802654521ea4716120e /drivers/input
parent4db02fecb4c2f1ce67bfd3fbb014d7dcb10a115a (diff)
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>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joystick/iforce/iforce-packets.c4
-rw-r--r--drivers/input/joystick/iforce/iforce-usb.c7
-rw-r--r--drivers/input/joystick/iforce/iforce.h1
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c
index 0d8f53b5ce53..08f98f2eaf88 100644
--- a/drivers/input/joystick/iforce/iforce-packets.c
+++ b/drivers/input/joystick/iforce/iforce-packets.c
@@ -257,7 +257,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
257 257
258 status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); 258 status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC);
259 if (status) { 259 if (status) {
260 dev_err(&iforce->dev->dev, 260 dev_err(&iforce->intf->dev,
261 "usb_submit_urb failed %d\n", status); 261 "usb_submit_urb failed %d\n", status);
262 return -1; 262 return -1;
263 } 263 }
@@ -266,7 +266,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
266 iforce->ctrl->status != -EINPROGRESS, HZ); 266 iforce->ctrl->status != -EINPROGRESS, HZ);
267 267
268 if (iforce->ctrl->status) { 268 if (iforce->ctrl->status) {
269 dev_dbg(&iforce->dev->dev, 269 dev_dbg(&iforce->intf->dev,
270 "iforce->ctrl->status = %d\n", 270 "iforce->ctrl->status = %d\n",
271 iforce->ctrl->status); 271 iforce->ctrl->status);
272 usb_unlink_urb(iforce->ctrl); 272 usb_unlink_urb(iforce->ctrl);
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c
index 15e8d6531e25..d96aa27dfcdc 100644
--- a/drivers/input/joystick/iforce/iforce-usb.c
+++ b/drivers/input/joystick/iforce/iforce-usb.c
@@ -64,7 +64,7 @@ void iforce_usb_xmit(struct iforce *iforce)
64 64
65 if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { 65 if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) {
66 clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); 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 /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended. 70 /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended.
@@ -76,7 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce)
76static void iforce_usb_irq(struct urb *urb) 76static void iforce_usb_irq(struct urb *urb)
77{ 77{
78 struct iforce *iforce = urb->context; 78 struct iforce *iforce = urb->context;
79 struct device *dev = &iforce->dev->dev; 79 struct device *dev = &iforce->intf->dev;
80 int status; 80 int status;
81 81
82 switch (urb->status) { 82 switch (urb->status) {
@@ -112,7 +112,7 @@ static void iforce_usb_out(struct urb *urb)
112 112
113 if (urb->status) { 113 if (urb->status) {
114 clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); 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 urb->status); 116 urb->status);
117 return; 117 return;
118 } 118 }
@@ -158,6 +158,7 @@ static int iforce_usb_probe(struct usb_interface *intf,
158 158
159 iforce->bus = IFORCE_USB; 159 iforce->bus = IFORCE_USB;
160 iforce->usbdev = dev; 160 iforce->usbdev = dev;
161 iforce->intf = intf;
161 162
162 iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; 163 iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE;
163 iforce->cr.wIndex = 0; 164 iforce->cr.wIndex = 0;
diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h
index 9f494b75848a..b1d7d9b0eb86 100644
--- a/drivers/input/joystick/iforce/iforce.h
+++ b/drivers/input/joystick/iforce/iforce.h
@@ -115,6 +115,7 @@ struct iforce {
115#endif 115#endif
116#ifdef CONFIG_JOYSTICK_IFORCE_USB 116#ifdef CONFIG_JOYSTICK_IFORCE_USB
117 struct usb_device *usbdev; /* USB transfer */ 117 struct usb_device *usbdev; /* USB transfer */
118 struct usb_interface *intf;
118 struct urb *irq, *out, *ctrl; 119 struct urb *irq, *out, *ctrl;
119 struct usb_ctrlrequest cr; 120 struct usb_ctrlrequest cr;
120#endif 121#endif