diff options
author | Felipe Balbi <balbi@ti.com> | 2011-11-04 06:32:47 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 04:48:29 -0500 |
commit | 25b8ff68bf1d4954d4a9dcb4862c6b6a53cb09e2 (patch) | |
tree | 450f0d681ae8bc836e8e7843cfb01e3dd54ccddf | |
parent | 4878a02898bab1a988206341e529997cb46e5f29 (diff) |
usb: dwc3: fix few coding style problems
There were a few coding style issues with this driver
which are now fixed:
drivers/usb/dwc3/debugfs.c:48: WARNING: Use #include \
<linux/uaccess.h> instead of <asm/uaccess.h>
drivers/usb/dwc3/debugfs.c:484: ERROR: space required \
before the open brace '{'
drivers/usb/dwc3/ep0.c:261: WARNING: line over 80 characters
drivers/usb/dwc3/ep0.c:287: WARNING: suspect code indent \
for conditional statements (16, 23)
drivers/usb/dwc3/gadget.c:749: WARNING: line over 80 characters
drivers/usb/dwc3/gadget.c:1267: WARNING: line over 80 characters
drivers/usb/dwc3/gadget.h:116: WARNING: line over 80 characters
drivers/usb/dwc3/io.h:42: WARNING: Use #include \
<linux/io.h> instead of <asm/io.h>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/dwc3/debugfs.c | 5 | ||||
-rw-r--r-- | drivers/usb/dwc3/ep0.c | 5 | ||||
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 10 | ||||
-rw-r--r-- | drivers/usb/dwc3/gadget.h | 3 | ||||
-rw-r--r-- | drivers/usb/dwc3/io.h | 2 |
5 files changed, 13 insertions, 12 deletions
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c index ca4be0afc33d..e78abb438b4b 100644 --- a/drivers/usb/dwc3/debugfs.c +++ b/drivers/usb/dwc3/debugfs.c | |||
@@ -44,8 +44,7 @@ | |||
44 | #include <linux/debugfs.h> | 44 | #include <linux/debugfs.h> |
45 | #include <linux/seq_file.h> | 45 | #include <linux/seq_file.h> |
46 | #include <linux/delay.h> | 46 | #include <linux/delay.h> |
47 | 47 | #include <linux/uaccess.h> | |
48 | #include <asm/uaccess.h> | ||
49 | 48 | ||
50 | #include "core.h" | 49 | #include "core.h" |
51 | #include "gadget.h" | 50 | #include "gadget.h" |
@@ -481,7 +480,7 @@ int __devinit dwc3_debugfs_init(struct dwc3 *dwc) | |||
481 | int ret; | 480 | int ret; |
482 | 481 | ||
483 | root = debugfs_create_dir(dev_name(dwc->dev), NULL); | 482 | root = debugfs_create_dir(dev_name(dwc->dev), NULL); |
484 | if (IS_ERR(root)){ | 483 | if (IS_ERR(root)) { |
485 | ret = PTR_ERR(root); | 484 | ret = PTR_ERR(root); |
486 | goto err0; | 485 | goto err0; |
487 | } | 486 | } |
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 7da25e181889..861a41aa87d2 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c | |||
@@ -258,7 +258,8 @@ static void dwc3_ep0_status_cmpl(struct usb_ep *ep, struct usb_request *req) | |||
258 | /* | 258 | /* |
259 | * ch 9.4.5 | 259 | * ch 9.4.5 |
260 | */ | 260 | */ |
261 | static int dwc3_ep0_handle_status(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl) | 261 | static int dwc3_ep0_handle_status(struct dwc3 *dwc, |
262 | struct usb_ctrlrequest *ctrl) | ||
262 | { | 263 | { |
263 | struct dwc3_ep *dep; | 264 | struct dwc3_ep *dep; |
264 | u32 recip; | 265 | u32 recip; |
@@ -285,7 +286,7 @@ static int dwc3_ep0_handle_status(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl | |||
285 | case USB_RECIP_ENDPOINT: | 286 | case USB_RECIP_ENDPOINT: |
286 | dep = dwc3_wIndex_to_dep(dwc, ctrl->wIndex); | 287 | dep = dwc3_wIndex_to_dep(dwc, ctrl->wIndex); |
287 | if (!dep) | 288 | if (!dep) |
288 | return -EINVAL; | 289 | return -EINVAL; |
289 | 290 | ||
290 | if (dep->flags & DWC3_EP_STALL) | 291 | if (dep->flags & DWC3_EP_STALL) |
291 | usb_status = 1 << USB_ENDPOINT_HALT; | 292 | usb_status = 1 << USB_ENDPOINT_HALT; |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 8aff490a1ae1..9497fa5e3921 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -745,8 +745,9 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param, | |||
745 | dep->flags |= DWC3_EP_BUSY; | 745 | dep->flags |= DWC3_EP_BUSY; |
746 | dep->res_trans_idx = dwc3_gadget_ep_get_transfer_index(dwc, | 746 | dep->res_trans_idx = dwc3_gadget_ep_get_transfer_index(dwc, |
747 | dep->number); | 747 | dep->number); |
748 | if (!dep->res_trans_idx) | 748 | |
749 | printk_once(KERN_ERR "%s() res_trans_idx is invalid\n", __func__); | 749 | WARN_ON_ONCE(!dep->res_trans_idx); |
750 | |||
750 | return 0; | 751 | return 0; |
751 | } | 752 | } |
752 | 753 | ||
@@ -1264,11 +1265,10 @@ static int __devinit dwc3_gadget_init_endpoints(struct dwc3 *dwc) | |||
1264 | &dwc->gadget.ep_list); | 1265 | &dwc->gadget.ep_list); |
1265 | 1266 | ||
1266 | ret = dwc3_alloc_trb_pool(dep); | 1267 | ret = dwc3_alloc_trb_pool(dep); |
1267 | if (ret) { | 1268 | if (ret) |
1268 | dev_err(dwc->dev, "%s: failed to allocate TRB pool\n", dep->name); | ||
1269 | return ret; | 1269 | return ret; |
1270 | } | ||
1271 | } | 1270 | } |
1271 | |||
1272 | INIT_LIST_HEAD(&dep->request_list); | 1272 | INIT_LIST_HEAD(&dep->request_list); |
1273 | INIT_LIST_HEAD(&dep->req_queued); | 1273 | INIT_LIST_HEAD(&dep->req_queued); |
1274 | } | 1274 | } |
diff --git a/drivers/usb/dwc3/gadget.h b/drivers/usb/dwc3/gadget.h index 5c4a56f055e9..4cdaf02ead5d 100644 --- a/drivers/usb/dwc3/gadget.h +++ b/drivers/usb/dwc3/gadget.h | |||
@@ -113,7 +113,8 @@ static inline void dwc3_gadget_move_request_queued(struct dwc3_request *req) | |||
113 | void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, | 113 | void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, |
114 | int status); | 114 | int status); |
115 | 115 | ||
116 | void dwc3_ep0_interrupt(struct dwc3 *dwc, const struct dwc3_event_depevt *event); | 116 | void dwc3_ep0_interrupt(struct dwc3 *dwc, |
117 | const struct dwc3_event_depevt *event); | ||
117 | void dwc3_ep0_out_start(struct dwc3 *dwc); | 118 | void dwc3_ep0_out_start(struct dwc3 *dwc); |
118 | int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request, | 119 | int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request, |
119 | gfp_t gfp_flags); | 120 | gfp_t gfp_flags); |
diff --git a/drivers/usb/dwc3/io.h b/drivers/usb/dwc3/io.h index bc957db1ea4b..071d561f3e68 100644 --- a/drivers/usb/dwc3/io.h +++ b/drivers/usb/dwc3/io.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #ifndef __DRIVERS_USB_DWC3_IO_H | 39 | #ifndef __DRIVERS_USB_DWC3_IO_H |
40 | #define __DRIVERS_USB_DWC3_IO_H | 40 | #define __DRIVERS_USB_DWC3_IO_H |
41 | 41 | ||
42 | #include <asm/io.h> | 42 | #include <linux/io.h> |
43 | 43 | ||
44 | static inline u32 dwc3_readl(void __iomem *base, u32 offset) | 44 | static inline u32 dwc3_readl(void __iomem *base, u32 offset) |
45 | { | 45 | { |