[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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ae0d6cceb2
commit
17f8bb7312
@@ -229,7 +229,7 @@ static void preproc_atl_queue(struct isp116x *isp116x)
|
|||||||
struct isp116x_ep *ep;
|
struct isp116x_ep *ep;
|
||||||
struct urb *urb;
|
struct urb *urb;
|
||||||
struct ptd *ptd;
|
struct ptd *ptd;
|
||||||
u16 toggle, dir, len;
|
u16 toggle = 0, dir = PTD_DIR_SETUP, len;
|
||||||
|
|
||||||
for (ep = isp116x->atl_active; ep; ep = ep->active) {
|
for (ep = isp116x->atl_active; ep; ep = ep->active) {
|
||||||
BUG_ON(list_empty(&ep->hep->urb_list));
|
BUG_ON(list_empty(&ep->hep->urb_list));
|
||||||
@@ -251,8 +251,6 @@ static void preproc_atl_queue(struct isp116x *isp116x)
|
|||||||
dir = PTD_DIR_OUT;
|
dir = PTD_DIR_OUT;
|
||||||
break;
|
break;
|
||||||
case USB_PID_SETUP:
|
case USB_PID_SETUP:
|
||||||
toggle = 0;
|
|
||||||
dir = PTD_DIR_SETUP;
|
|
||||||
len = sizeof(struct usb_ctrlrequest);
|
len = sizeof(struct usb_ctrlrequest);
|
||||||
ep->data = urb->setup_packet;
|
ep->data = urb->setup_packet;
|
||||||
break;
|
break;
|
||||||
@@ -264,11 +262,9 @@ static void preproc_atl_queue(struct isp116x *isp116x)
|
|||||||
? PTD_DIR_OUT : PTD_DIR_IN;
|
? PTD_DIR_OUT : PTD_DIR_IN;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* To please gcc */
|
|
||||||
toggle = dir = 0;
|
|
||||||
ERR("%s %d: ep->nextpid %d\n", __func__, __LINE__,
|
ERR("%s %d: ep->nextpid %d\n", __func__, __LINE__,
|
||||||
ep->nextpid);
|
ep->nextpid);
|
||||||
BUG_ON(1);
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
ptd->count = PTD_CC_MSK | PTD_ACTIVE_MSK | PTD_TOGGLE(toggle);
|
ptd->count = PTD_CC_MSK | PTD_ACTIVE_MSK | PTD_TOGGLE(toggle);
|
||||||
@@ -1054,7 +1050,7 @@ static int isp116x_hub_control(struct usb_hcd *hcd,
|
|||||||
break;
|
break;
|
||||||
case GetHubStatus:
|
case GetHubStatus:
|
||||||
DBG("GetHubStatus\n");
|
DBG("GetHubStatus\n");
|
||||||
*(__le32 *) buf = cpu_to_le32(0);
|
*(__le32 *) buf = 0;
|
||||||
break;
|
break;
|
||||||
case GetPortStatus:
|
case GetPortStatus:
|
||||||
DBG("GetPortStatus\n");
|
DBG("GetPortStatus\n");
|
||||||
@@ -1810,9 +1806,9 @@ static int isp116x_suspend(struct device *dev, pm_message_t state, u32 phase)
|
|||||||
ret = usb_suspend_device(hcd->self.root_hub, state);
|
ret = usb_suspend_device(hcd->self.root_hub, state);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
dev->power.power_state = state;
|
dev->power.power_state = state;
|
||||||
INFO("%s suspended\n", (char *)hcd_name);
|
INFO("%s suspended\n", hcd_name);
|
||||||
} else
|
} else
|
||||||
ERR("%s suspend failed\n", (char *)hcd_name);
|
ERR("%s suspend failed\n", hcd_name);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user