diff options
Diffstat (limited to 'drivers/input/joystick/iforce/iforce-usb.c')
-rw-r--r-- | drivers/input/joystick/iforce/iforce-usb.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index 6c96631ae5d..d96aa27dfcd 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,6 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce) | |||
76 | static void iforce_usb_irq(struct urb *urb) | 76 | static 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->intf->dev; | ||
79 | int status; | 80 | int status; |
80 | 81 | ||
81 | switch (urb->status) { | 82 | switch (urb->status) { |
@@ -86,11 +87,12 @@ static void iforce_usb_irq(struct urb *urb) | |||
86 | case -ENOENT: | 87 | case -ENOENT: |
87 | case -ESHUTDOWN: | 88 | case -ESHUTDOWN: |
88 | /* this urb is terminated, clean up */ | 89 | /* this urb is terminated, clean up */ |
89 | dbg("%s - urb shutting down with status: %d", | 90 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
90 | __func__, urb->status); | 91 | __func__, urb->status); |
91 | return; | 92 | return; |
92 | default: | 93 | default: |
93 | dbg("%s - urb has status of: %d", __func__, urb->status); | 94 | dev_dbg(dev, "%s - urb has status of: %d\n", |
95 | __func__, urb->status); | ||
94 | goto exit; | 96 | goto exit; |
95 | } | 97 | } |
96 | 98 | ||
@@ -100,8 +102,8 @@ static void iforce_usb_irq(struct urb *urb) | |||
100 | exit: | 102 | exit: |
101 | status = usb_submit_urb (urb, GFP_ATOMIC); | 103 | status = usb_submit_urb (urb, GFP_ATOMIC); |
102 | if (status) | 104 | if (status) |
103 | err ("%s - usb_submit_urb failed with result %d", | 105 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
104 | __func__, status); | 106 | __func__, status); |
105 | } | 107 | } |
106 | 108 | ||
107 | static void iforce_usb_out(struct urb *urb) | 109 | static void iforce_usb_out(struct urb *urb) |
@@ -110,7 +112,8 @@ static void iforce_usb_out(struct urb *urb) | |||
110 | 112 | ||
111 | if (urb->status) { | 113 | if (urb->status) { |
112 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); | 114 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); |
113 | dbg("urb->status %d, exiting", urb->status); | 115 | dev_dbg(&iforce->intf->dev, "urb->status %d, exiting\n", |
116 | urb->status); | ||
114 | return; | 117 | return; |
115 | } | 118 | } |
116 | 119 | ||
@@ -155,6 +158,7 @@ static int iforce_usb_probe(struct usb_interface *intf, | |||
155 | 158 | ||
156 | iforce->bus = IFORCE_USB; | 159 | iforce->bus = IFORCE_USB; |
157 | iforce->usbdev = dev; | 160 | iforce->usbdev = dev; |
161 | iforce->intf = intf; | ||
158 | 162 | ||
159 | 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; |
160 | iforce->cr.wIndex = 0; | 164 | iforce->cr.wIndex = 0; |