*/
static int service_tx_status_request(
struct musb *musb,
- const struct usb_ctrlrequest *pControlRequest)
+ const struct usb_ctrlrequest *ctrlrequest)
{
void __iomem *mbase = musb->mregs;
int handled = 1;
u8 bResult[2], epnum = 0;
- const u8 bRecip = pControlRequest->bRequestType & USB_RECIP_MASK;
+ const u8 bRecip = ctrlrequest->bRequestType & USB_RECIP_MASK;
bResult[1] = 0;
u16 tmp;
void __iomem *regs;
- epnum = (u8) pControlRequest->wIndex;
+ epnum = (u8) ctrlrequest->wIndex;
if (!epnum) {
bResult[0] = 0;
break;
/* fill up the fifo; caller updates csr0 */
if (handled > 0) {
- u16 len = le16_to_cpu(pControlRequest->wLength);
+ u16 len = le16_to_cpu(ctrlrequest->wLength);
if (len > 2)
len = 2;
*/
static int
service_in_request(struct musb *musb,
- const struct usb_ctrlrequest *pControlRequest)
+ const struct usb_ctrlrequest *ctrlrequest)
{
int handled = 0; /* not handled */
- if ((pControlRequest->bRequestType & USB_TYPE_MASK)
+ if ((ctrlrequest->bRequestType & USB_TYPE_MASK)
== USB_TYPE_STANDARD) {
- switch (pControlRequest->bRequest) {
+ switch (ctrlrequest->bRequest) {
case USB_REQ_GET_STATUS:
handled = service_tx_status_request(musb,
- pControlRequest);
+ ctrlrequest);
break;
/* case USB_REQ_SYNC_FRAME: */
*/
static int
service_zero_data_request(struct musb *musb,
- struct usb_ctrlrequest *pControlRequest)
+ struct usb_ctrlrequest *ctrlrequest)
__releases(musb->lock)
__acquires(musb->lock)
{
int handled = -EINVAL;
void __iomem *mbase = musb->mregs;
- const u8 bRecip = pControlRequest->bRequestType & USB_RECIP_MASK;
+ const u8 bRecip = ctrlrequest->bRequestType & USB_RECIP_MASK;
/* the gadget driver handles everything except what we MUST handle */
- if ((pControlRequest->bRequestType & USB_TYPE_MASK)
+ if ((ctrlrequest->bRequestType & USB_TYPE_MASK)
== USB_TYPE_STANDARD) {
- switch (pControlRequest->bRequest) {
+ switch (ctrlrequest->bRequest) {
case USB_REQ_SET_ADDRESS:
/* change it after the status stage */
musb->bSetAddress = TRUE;
- musb->address = (u8) (pControlRequest->wValue & 0x7f);
+ musb->address = (u8) (ctrlrequest->wValue & 0x7f);
handled = 1;
break;
case USB_REQ_CLEAR_FEATURE:
switch (bRecip) {
case USB_RECIP_DEVICE:
- if (pControlRequest->wValue
+ if (ctrlrequest->wValue
!= USB_DEVICE_REMOTE_WAKEUP)
break;
musb->may_wakeup = 0;
case USB_RECIP_INTERFACE:
break;
case USB_RECIP_ENDPOINT:{
- const u8 epnum = pControlRequest->wIndex & 0x0f;
+ const u8 epnum = ctrlrequest->wIndex & 0x0f;
struct musb_ep *musb_ep;
if (epnum == 0
|| epnum >= MUSB_C_NUM_EPS
- || pControlRequest->wValue
+ || ctrlrequest->wValue
!= USB_ENDPOINT_HALT)
break;
- if (pControlRequest->wIndex & USB_DIR_IN)
+ if (ctrlrequest->wIndex & USB_DIR_IN)
musb_ep = &musb->endpoints[epnum].ep_in;
else
musb_ep = &musb->endpoints[epnum].ep_out;
switch (bRecip) {
case USB_RECIP_DEVICE:
handled = 1;
- switch (pControlRequest->wValue) {
+ switch (ctrlrequest->wValue) {
case USB_DEVICE_REMOTE_WAKEUP:
musb->may_wakeup = 1;
break;
case USB_DEVICE_TEST_MODE:
if (musb->g.speed != USB_SPEED_HIGH)
goto stall;
- if (pControlRequest->wIndex & 0xff)
+ if (ctrlrequest->wIndex & 0xff)
goto stall;
- switch (pControlRequest->wIndex >> 8) {
+ switch (ctrlrequest->wIndex >> 8) {
case 1:
pr_debug("TEST_J\n");
/* TEST_J */
case USB_RECIP_ENDPOINT:{
const u8 epnum =
- pControlRequest->wIndex & 0x0f;
+ ctrlrequest->wIndex & 0x0f;
struct musb_ep *musb_ep;
struct musb_hw_ep *ep;
void __iomem *regs;
if (epnum == 0
|| epnum >= MUSB_C_NUM_EPS
- || pControlRequest->wValue
+ || ctrlrequest->wValue
!= USB_ENDPOINT_HALT)
break;
ep = musb->endpoints + epnum;
regs = ep->regs;
- is_in = pControlRequest->wIndex & USB_DIR_IN;
+ is_in = ctrlrequest->wIndex & USB_DIR_IN;
if (is_in)
musb_ep = &ep->ep_in;
else
static int
forward_to_driver(struct musb *musb,
- const struct usb_ctrlrequest *pControlRequest)
+ const struct usb_ctrlrequest *ctrlrequest)
__releases(musb->lock)
__acquires(musb->lock)
{
if (!musb->gadget_driver)
return -EOPNOTSUPP;
spin_unlock(&musb->lock);
- retval = musb->gadget_driver->setup(&musb->g, pControlRequest);
+ retval = musb->gadget_driver->setup(&musb->g, ctrlrequest);
spin_lock(&musb->lock);
return retval;
}