diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-23 22:56:53 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 04:44:56 -0500 |
commit | 25234b46be2a1688d38fb55ed9d7e3f2cc41c9af (patch) | |
tree | e0950a33eb5ee1bbe3b9542067692ae35a2e66fc | |
parent | 76190152fb62650ea6530c166d9adbaa08cdb5d0 (diff) |
usb: gadget: renesas_usbhs: tidyup mod_host request variable name
renesas_usbhs driver use "req" for struct usb_ctrlrequest,
and "ureq" for struct usbhsh_request
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_host.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index 2656d5989e68..c453b6c215a7 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c | |||
@@ -170,19 +170,19 @@ static const char usbhsh_hcd_name[] = "renesas_usbhs host"; | |||
170 | #define usbhsh_port_stat_clear(h, s) ((h)->port_stat &= ~(s)) | 170 | #define usbhsh_port_stat_clear(h, s) ((h)->port_stat &= ~(s)) |
171 | #define usbhsh_port_stat_get(h) ((h)->port_stat) | 171 | #define usbhsh_port_stat_get(h) ((h)->port_stat) |
172 | 172 | ||
173 | #define usbhsh_pkt_to_req(p) \ | 173 | #define usbhsh_pkt_to_ureq(p) \ |
174 | container_of((void *)p, struct usbhsh_request, pkt) | 174 | container_of((void *)p, struct usbhsh_request, pkt) |
175 | 175 | ||
176 | /* | 176 | /* |
177 | * req alloc/free | 177 | * req alloc/free |
178 | */ | 178 | */ |
179 | static void usbhsh_req_list_init(struct usbhsh_hpriv *hpriv) | 179 | static void usbhsh_ureq_list_init(struct usbhsh_hpriv *hpriv) |
180 | { | 180 | { |
181 | INIT_LIST_HEAD(&hpriv->ureq_link_active); | 181 | INIT_LIST_HEAD(&hpriv->ureq_link_active); |
182 | INIT_LIST_HEAD(&hpriv->ureq_link_free); | 182 | INIT_LIST_HEAD(&hpriv->ureq_link_free); |
183 | } | 183 | } |
184 | 184 | ||
185 | static void usbhsh_req_list_quit(struct usbhsh_hpriv *hpriv) | 185 | static void usbhsh_ureq_list_quit(struct usbhsh_hpriv *hpriv) |
186 | { | 186 | { |
187 | struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); | 187 | struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); |
188 | struct device *dev = usbhsh_hcd_to_dev(hcd); | 188 | struct device *dev = usbhsh_hcd_to_dev(hcd); |
@@ -201,7 +201,7 @@ static void usbhsh_req_list_quit(struct usbhsh_hpriv *hpriv) | |||
201 | kfree(ureq); | 201 | kfree(ureq); |
202 | } | 202 | } |
203 | 203 | ||
204 | static struct usbhsh_request *usbhsh_req_alloc(struct usbhsh_hpriv *hpriv, | 204 | static struct usbhsh_request *usbhsh_ureq_alloc(struct usbhsh_hpriv *hpriv, |
205 | struct urb *urb, | 205 | struct urb *urb, |
206 | gfp_t mem_flags) | 206 | gfp_t mem_flags) |
207 | { | 207 | { |
@@ -243,7 +243,7 @@ static struct usbhsh_request *usbhsh_req_alloc(struct usbhsh_hpriv *hpriv, | |||
243 | return ureq; | 243 | return ureq; |
244 | } | 244 | } |
245 | 245 | ||
246 | static void usbhsh_req_free(struct usbhsh_hpriv *hpriv, | 246 | static void usbhsh_ureq_free(struct usbhsh_hpriv *hpriv, |
247 | struct usbhsh_request *ureq) | 247 | struct usbhsh_request *ureq) |
248 | { | 248 | { |
249 | struct usbhs_pkt *pkt = &ureq->pkt; | 249 | struct usbhs_pkt *pkt = &ureq->pkt; |
@@ -480,7 +480,7 @@ void usbhsh_endpoint_free(struct usbhsh_hpriv *hpriv, | |||
480 | */ | 480 | */ |
481 | static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt) | 481 | static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt) |
482 | { | 482 | { |
483 | struct usbhsh_request *ureq = usbhsh_pkt_to_req(pkt); | 483 | struct usbhsh_request *ureq = usbhsh_pkt_to_ureq(pkt); |
484 | struct usbhsh_hpriv *hpriv = usbhsh_priv_to_hpriv(priv); | 484 | struct usbhsh_hpriv *hpriv = usbhsh_priv_to_hpriv(priv); |
485 | struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); | 485 | struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); |
486 | struct urb *urb = ureq->urb; | 486 | struct urb *urb = ureq->urb; |
@@ -494,7 +494,7 @@ static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt) | |||
494 | } | 494 | } |
495 | 495 | ||
496 | urb->actual_length = pkt->actual; | 496 | urb->actual_length = pkt->actual; |
497 | usbhsh_req_free(hpriv, ureq); | 497 | usbhsh_ureq_free(hpriv, ureq); |
498 | usbhsh_urb_to_ureq(urb) = NULL; | 498 | usbhsh_urb_to_ureq(urb) = NULL; |
499 | 499 | ||
500 | usb_hcd_unlink_urb_from_ep(hcd, urb); | 500 | usb_hcd_unlink_urb_from_ep(hcd, urb); |
@@ -537,12 +537,12 @@ static int usbhsh_queue_push(struct usb_hcd *hcd, | |||
537 | */ | 537 | */ |
538 | static int usbhsh_is_request_address(struct urb *urb) | 538 | static int usbhsh_is_request_address(struct urb *urb) |
539 | { | 539 | { |
540 | struct usb_ctrlrequest *cmd; | 540 | struct usb_ctrlrequest *req; |
541 | 541 | ||
542 | cmd = (struct usb_ctrlrequest *)urb->setup_packet; | 542 | req = (struct usb_ctrlrequest *)urb->setup_packet; |
543 | 543 | ||
544 | if ((DeviceOutRequest == cmd->bRequestType << 8) && | 544 | if ((DeviceOutRequest == req->bRequestType << 8) && |
545 | (USB_REQ_SET_ADDRESS == cmd->bRequest)) | 545 | (USB_REQ_SET_ADDRESS == req->bRequest)) |
546 | return 1; | 546 | return 1; |
547 | else | 547 | else |
548 | return 0; | 548 | return 0; |
@@ -595,13 +595,13 @@ static void usbhsh_setup_stage_packet_push(struct usbhsh_hpriv *hpriv, | |||
595 | static void usbhsh_data_stage_packet_done(struct usbhs_priv *priv, | 595 | static void usbhsh_data_stage_packet_done(struct usbhs_priv *priv, |
596 | struct usbhs_pkt *pkt) | 596 | struct usbhs_pkt *pkt) |
597 | { | 597 | { |
598 | struct usbhsh_request *ureq = usbhsh_pkt_to_req(pkt); | 598 | struct usbhsh_request *ureq = usbhsh_pkt_to_ureq(pkt); |
599 | struct usbhsh_hpriv *hpriv = usbhsh_priv_to_hpriv(priv); | 599 | struct usbhsh_hpriv *hpriv = usbhsh_priv_to_hpriv(priv); |
600 | struct urb *urb = ureq->urb; | 600 | struct urb *urb = ureq->urb; |
601 | 601 | ||
602 | /* this ureq was connected to urb when usbhsh_urb_enqueue() */ | 602 | /* this ureq was connected to urb when usbhsh_urb_enqueue() */ |
603 | 603 | ||
604 | usbhsh_req_free(hpriv, ureq); | 604 | usbhsh_ureq_free(hpriv, ureq); |
605 | usbhsh_urb_to_ureq(urb) = NULL; | 605 | usbhsh_urb_to_ureq(urb) = NULL; |
606 | } | 606 | } |
607 | 607 | ||
@@ -650,7 +650,7 @@ static void usbhsh_status_stage_packet_push(struct usbhsh_hpriv *hpriv, | |||
650 | * status stage uses allocated ureq. | 650 | * status stage uses allocated ureq. |
651 | * it will be freed on usbhsh_queue_done() | 651 | * it will be freed on usbhsh_queue_done() |
652 | */ | 652 | */ |
653 | ureq = usbhsh_req_alloc(hpriv, urb, GFP_KERNEL); | 653 | ureq = usbhsh_ureq_alloc(hpriv, urb, GFP_KERNEL); |
654 | pkt = &ureq->pkt; | 654 | pkt = &ureq->pkt; |
655 | 655 | ||
656 | if (usb_pipein(urb->pipe)) | 656 | if (usb_pipein(urb->pipe)) |
@@ -772,7 +772,7 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd, | |||
772 | /* | 772 | /* |
773 | * alloc new request | 773 | * alloc new request |
774 | */ | 774 | */ |
775 | ureq = usbhsh_req_alloc(hpriv, urb, mem_flags); | 775 | ureq = usbhsh_ureq_alloc(hpriv, urb, mem_flags); |
776 | if (unlikely(!ureq)) { | 776 | if (unlikely(!ureq)) { |
777 | ret = -ENOMEM; | 777 | ret = -ENOMEM; |
778 | goto usbhsh_urb_enqueue_error_free_endpoint; | 778 | goto usbhsh_urb_enqueue_error_free_endpoint; |
@@ -807,7 +807,7 @@ static int usbhsh_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
807 | struct usbhsh_request *ureq = usbhsh_urb_to_ureq(urb); | 807 | struct usbhsh_request *ureq = usbhsh_urb_to_ureq(urb); |
808 | 808 | ||
809 | if (ureq) { | 809 | if (ureq) { |
810 | usbhsh_req_free(hpriv, ureq); | 810 | usbhsh_ureq_free(hpriv, ureq); |
811 | usbhsh_urb_to_ureq(urb) = NULL; | 811 | usbhsh_urb_to_ureq(urb) = NULL; |
812 | } | 812 | } |
813 | 813 | ||
@@ -1291,7 +1291,7 @@ int usbhs_mod_host_probe(struct usbhs_priv *priv) | |||
1291 | hpriv->mod.stop = usbhsh_stop; | 1291 | hpriv->mod.stop = usbhsh_stop; |
1292 | hpriv->pipe_info = pipe_info; | 1292 | hpriv->pipe_info = pipe_info; |
1293 | hpriv->pipe_size = pipe_size; | 1293 | hpriv->pipe_size = pipe_size; |
1294 | usbhsh_req_list_init(hpriv); | 1294 | usbhsh_ureq_list_init(hpriv); |
1295 | usbhsh_port_stat_init(hpriv); | 1295 | usbhsh_port_stat_init(hpriv); |
1296 | 1296 | ||
1297 | /* init all device */ | 1297 | /* init all device */ |
@@ -1315,7 +1315,7 @@ int usbhs_mod_host_remove(struct usbhs_priv *priv) | |||
1315 | struct usbhsh_hpriv *hpriv = usbhsh_priv_to_hpriv(priv); | 1315 | struct usbhsh_hpriv *hpriv = usbhsh_priv_to_hpriv(priv); |
1316 | struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); | 1316 | struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); |
1317 | 1317 | ||
1318 | usbhsh_req_list_quit(hpriv); | 1318 | usbhsh_ureq_list_quit(hpriv); |
1319 | 1319 | ||
1320 | usb_put_hcd(hcd); | 1320 | usb_put_hcd(hcd); |
1321 | 1321 | ||