Commit 1d958a49 authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Search and replace pControlRequest with ctrlrequest

Search and replace pControlRequest with ctrlrequest
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 46ee4566
...@@ -72,12 +72,12 @@ static char *decode_ep0stage(u8 stage) ...@@ -72,12 +72,12 @@ static char *decode_ep0stage(u8 stage)
*/ */
static int service_tx_status_request( static int service_tx_status_request(
struct musb *musb, struct musb *musb,
const struct usb_ctrlrequest *pControlRequest) const struct usb_ctrlrequest *ctrlrequest)
{ {
void __iomem *mbase = musb->mregs; void __iomem *mbase = musb->mregs;
int handled = 1; int handled = 1;
u8 bResult[2], epnum = 0; u8 bResult[2], epnum = 0;
const u8 bRecip = pControlRequest->bRequestType & USB_RECIP_MASK; const u8 bRecip = ctrlrequest->bRequestType & USB_RECIP_MASK;
bResult[1] = 0; bResult[1] = 0;
...@@ -107,7 +107,7 @@ static int service_tx_status_request( ...@@ -107,7 +107,7 @@ static int service_tx_status_request(
u16 tmp; u16 tmp;
void __iomem *regs; void __iomem *regs;
epnum = (u8) pControlRequest->wIndex; epnum = (u8) ctrlrequest->wIndex;
if (!epnum) { if (!epnum) {
bResult[0] = 0; bResult[0] = 0;
break; break;
...@@ -147,7 +147,7 @@ static int service_tx_status_request( ...@@ -147,7 +147,7 @@ static int service_tx_status_request(
/* fill up the fifo; caller updates csr0 */ /* fill up the fifo; caller updates csr0 */
if (handled > 0) { if (handled > 0) {
u16 len = le16_to_cpu(pControlRequest->wLength); u16 len = le16_to_cpu(ctrlrequest->wLength);
if (len > 2) if (len > 2)
len = 2; len = 2;
...@@ -170,16 +170,16 @@ static int service_tx_status_request( ...@@ -170,16 +170,16 @@ static int service_tx_status_request(
*/ */
static int static int
service_in_request(struct musb *musb, service_in_request(struct musb *musb,
const struct usb_ctrlrequest *pControlRequest) const struct usb_ctrlrequest *ctrlrequest)
{ {
int handled = 0; /* not handled */ int handled = 0; /* not handled */
if ((pControlRequest->bRequestType & USB_TYPE_MASK) if ((ctrlrequest->bRequestType & USB_TYPE_MASK)
== USB_TYPE_STANDARD) { == USB_TYPE_STANDARD) {
switch (pControlRequest->bRequest) { switch (ctrlrequest->bRequest) {
case USB_REQ_GET_STATUS: case USB_REQ_GET_STATUS:
handled = service_tx_status_request(musb, handled = service_tx_status_request(musb,
pControlRequest); ctrlrequest);
break; break;
/* case USB_REQ_SYNC_FRAME: */ /* case USB_REQ_SYNC_FRAME: */
...@@ -225,29 +225,29 @@ static inline void musb_try_b_hnp_enable(struct musb *musb) ...@@ -225,29 +225,29 @@ static inline void musb_try_b_hnp_enable(struct musb *musb)
*/ */
static int static int
service_zero_data_request(struct musb *musb, service_zero_data_request(struct musb *musb,
struct usb_ctrlrequest *pControlRequest) struct usb_ctrlrequest *ctrlrequest)
__releases(musb->lock) __releases(musb->lock)
__acquires(musb->lock) __acquires(musb->lock)
{ {
int handled = -EINVAL; int handled = -EINVAL;
void __iomem *mbase = musb->mregs; 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 */ /* 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) { == USB_TYPE_STANDARD) {
switch (pControlRequest->bRequest) { switch (ctrlrequest->bRequest) {
case USB_REQ_SET_ADDRESS: case USB_REQ_SET_ADDRESS:
/* change it after the status stage */ /* change it after the status stage */
musb->bSetAddress = TRUE; musb->bSetAddress = TRUE;
musb->address = (u8) (pControlRequest->wValue & 0x7f); musb->address = (u8) (ctrlrequest->wValue & 0x7f);
handled = 1; handled = 1;
break; break;
case USB_REQ_CLEAR_FEATURE: case USB_REQ_CLEAR_FEATURE:
switch (bRecip) { switch (bRecip) {
case USB_RECIP_DEVICE: case USB_RECIP_DEVICE:
if (pControlRequest->wValue if (ctrlrequest->wValue
!= USB_DEVICE_REMOTE_WAKEUP) != USB_DEVICE_REMOTE_WAKEUP)
break; break;
musb->may_wakeup = 0; musb->may_wakeup = 0;
...@@ -256,16 +256,16 @@ __acquires(musb->lock) ...@@ -256,16 +256,16 @@ __acquires(musb->lock)
case USB_RECIP_INTERFACE: case USB_RECIP_INTERFACE:
break; break;
case USB_RECIP_ENDPOINT:{ case USB_RECIP_ENDPOINT:{
const u8 epnum = pControlRequest->wIndex & 0x0f; const u8 epnum = ctrlrequest->wIndex & 0x0f;
struct musb_ep *musb_ep; struct musb_ep *musb_ep;
if (epnum == 0 if (epnum == 0
|| epnum >= MUSB_C_NUM_EPS || epnum >= MUSB_C_NUM_EPS
|| pControlRequest->wValue || ctrlrequest->wValue
!= USB_ENDPOINT_HALT) != USB_ENDPOINT_HALT)
break; break;
if (pControlRequest->wIndex & USB_DIR_IN) if (ctrlrequest->wIndex & USB_DIR_IN)
musb_ep = &musb->endpoints[epnum].ep_in; musb_ep = &musb->endpoints[epnum].ep_in;
else else
musb_ep = &musb->endpoints[epnum].ep_out; musb_ep = &musb->endpoints[epnum].ep_out;
...@@ -292,17 +292,17 @@ __acquires(musb->lock) ...@@ -292,17 +292,17 @@ __acquires(musb->lock)
switch (bRecip) { switch (bRecip) {
case USB_RECIP_DEVICE: case USB_RECIP_DEVICE:
handled = 1; handled = 1;
switch (pControlRequest->wValue) { switch (ctrlrequest->wValue) {
case USB_DEVICE_REMOTE_WAKEUP: case USB_DEVICE_REMOTE_WAKEUP:
musb->may_wakeup = 1; musb->may_wakeup = 1;
break; break;
case USB_DEVICE_TEST_MODE: case USB_DEVICE_TEST_MODE:
if (musb->g.speed != USB_SPEED_HIGH) if (musb->g.speed != USB_SPEED_HIGH)
goto stall; goto stall;
if (pControlRequest->wIndex & 0xff) if (ctrlrequest->wIndex & 0xff)
goto stall; goto stall;
switch (pControlRequest->wIndex >> 8) { switch (ctrlrequest->wIndex >> 8) {
case 1: case 1:
pr_debug("TEST_J\n"); pr_debug("TEST_J\n");
/* TEST_J */ /* TEST_J */
...@@ -365,7 +365,7 @@ stall: ...@@ -365,7 +365,7 @@ stall:
case USB_RECIP_ENDPOINT:{ case USB_RECIP_ENDPOINT:{
const u8 epnum = const u8 epnum =
pControlRequest->wIndex & 0x0f; ctrlrequest->wIndex & 0x0f;
struct musb_ep *musb_ep; struct musb_ep *musb_ep;
struct musb_hw_ep *ep; struct musb_hw_ep *ep;
void __iomem *regs; void __iomem *regs;
...@@ -374,13 +374,13 @@ stall: ...@@ -374,13 +374,13 @@ stall:
if (epnum == 0 if (epnum == 0
|| epnum >= MUSB_C_NUM_EPS || epnum >= MUSB_C_NUM_EPS
|| pControlRequest->wValue || ctrlrequest->wValue
!= USB_ENDPOINT_HALT) != USB_ENDPOINT_HALT)
break; break;
ep = musb->endpoints + epnum; ep = musb->endpoints + epnum;
regs = ep->regs; regs = ep->regs;
is_in = pControlRequest->wIndex & USB_DIR_IN; is_in = ctrlrequest->wIndex & USB_DIR_IN;
if (is_in) if (is_in)
musb_ep = &ep->ep_in; musb_ep = &ep->ep_in;
else else
...@@ -578,7 +578,7 @@ musb_read_setup(struct musb *musb, struct usb_ctrlrequest *req) ...@@ -578,7 +578,7 @@ musb_read_setup(struct musb *musb, struct usb_ctrlrequest *req)
static int static int
forward_to_driver(struct musb *musb, forward_to_driver(struct musb *musb,
const struct usb_ctrlrequest *pControlRequest) const struct usb_ctrlrequest *ctrlrequest)
__releases(musb->lock) __releases(musb->lock)
__acquires(musb->lock) __acquires(musb->lock)
{ {
...@@ -586,7 +586,7 @@ __acquires(musb->lock) ...@@ -586,7 +586,7 @@ __acquires(musb->lock)
if (!musb->gadget_driver) if (!musb->gadget_driver)
return -EOPNOTSUPP; return -EOPNOTSUPP;
spin_unlock(&musb->lock); spin_unlock(&musb->lock);
retval = musb->gadget_driver->setup(&musb->g, pControlRequest); retval = musb->gadget_driver->setup(&musb->g, ctrlrequest);
spin_lock(&musb->lock); spin_lock(&musb->lock);
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment