aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorOlav Kongas <ok@artecdesign.ee>2005-06-23 13:12:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-07-12 14:52:55 -0400
commit17f8bb7312fa9b00f80c3c0f8d5a5d698eb97bbd (patch)
tree076e9c35eec8ff6f465aa08ae9025f7d9d6c83ad /drivers/usb
parentae0d6cceb20eec57e7196c22999c62c465ffd5bf (diff)
[PATCH] USB: isp116x-hcd cleanup
Sorry that it took so long. Here comes a cleanup patch that addresses the remarks by Alexey Dobriyan about gregkh-usb-usb-isp116x-hcd-add.patch EXCEPT the remark about the typecasting of mem_flags argument for kcalloc; this will be addressed in a later patch. OlavCleanup of isp116x-hcd. Signed off by: Olav Kongas <ok@artecdesign.ee> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/isp116x-hcd.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index ff0a168e8eed..3f2cea21efc5 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -17,7 +17,7 @@
17 * The driver basically works. A number of people have used it with a range 17 * The driver basically works. A number of people have used it with a range
18 * of devices. 18 * of devices.
19 * 19 *
20 *The driver passes all usbtests 1-14. 20 * The driver passes all usbtests 1-14.
21 * 21 *
22 * Suspending/resuming of root hub via sysfs works. Remote wakeup works too. 22 * Suspending/resuming of root hub via sysfs works. Remote wakeup works too.
23 * And suspending/resuming of platform device works too. Suspend/resume 23 * And suspending/resuming of platform device works too. Suspend/resume
@@ -229,7 +229,7 @@ static void preproc_atl_queue(struct isp116x *isp116x)
229 struct isp116x_ep *ep; 229 struct isp116x_ep *ep;
230 struct urb *urb; 230 struct urb *urb;
231 struct ptd *ptd; 231 struct ptd *ptd;
232 u16 toggle, dir, len; 232 u16 toggle = 0, dir = PTD_DIR_SETUP, len;
233 233
234 for (ep = isp116x->atl_active; ep; ep = ep->active) { 234 for (ep = isp116x->atl_active; ep; ep = ep->active) {
235 BUG_ON(list_empty(&ep->hep->urb_list)); 235 BUG_ON(list_empty(&ep->hep->urb_list));
@@ -251,8 +251,6 @@ static void preproc_atl_queue(struct isp116x *isp116x)
251 dir = PTD_DIR_OUT; 251 dir = PTD_DIR_OUT;
252 break; 252 break;
253 case USB_PID_SETUP: 253 case USB_PID_SETUP:
254 toggle = 0;
255 dir = PTD_DIR_SETUP;
256 len = sizeof(struct usb_ctrlrequest); 254 len = sizeof(struct usb_ctrlrequest);
257 ep->data = urb->setup_packet; 255 ep->data = urb->setup_packet;
258 break; 256 break;
@@ -264,11 +262,9 @@ static void preproc_atl_queue(struct isp116x *isp116x)
264 ? PTD_DIR_OUT : PTD_DIR_IN; 262 ? PTD_DIR_OUT : PTD_DIR_IN;
265 break; 263 break;
266 default: 264 default:
267 /* To please gcc */
268 toggle = dir = 0;
269 ERR("%s %d: ep->nextpid %d\n", __func__, __LINE__, 265 ERR("%s %d: ep->nextpid %d\n", __func__, __LINE__,
270 ep->nextpid); 266 ep->nextpid);
271 BUG_ON(1); 267 BUG();
272 } 268 }
273 269
274 ptd->count = PTD_CC_MSK | PTD_ACTIVE_MSK | PTD_TOGGLE(toggle); 270 ptd->count = PTD_CC_MSK | PTD_ACTIVE_MSK | PTD_TOGGLE(toggle);
@@ -1054,7 +1050,7 @@ static int isp116x_hub_control(struct usb_hcd *hcd,
1054 break; 1050 break;
1055 case GetHubStatus: 1051 case GetHubStatus:
1056 DBG("GetHubStatus\n"); 1052 DBG("GetHubStatus\n");
1057 *(__le32 *) buf = cpu_to_le32(0); 1053 *(__le32 *) buf = 0;
1058 break; 1054 break;
1059 case GetPortStatus: 1055 case GetPortStatus:
1060 DBG("GetPortStatus\n"); 1056 DBG("GetPortStatus\n");
@@ -1810,9 +1806,9 @@ static int isp116x_suspend(struct device *dev, pm_message_t state, u32 phase)
1810 ret = usb_suspend_device(hcd->self.root_hub, state); 1806 ret = usb_suspend_device(hcd->self.root_hub, state);
1811 if (!ret) { 1807 if (!ret) {
1812 dev->power.power_state = state; 1808 dev->power.power_state = state;
1813 INFO("%s suspended\n", (char *)hcd_name); 1809 INFO("%s suspended\n", hcd_name);
1814 } else 1810 } else
1815 ERR("%s suspend failed\n", (char *)hcd_name); 1811 ERR("%s suspend failed\n", hcd_name);
1816 1812
1817 return ret; 1813 return ret;
1818} 1814}