summaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/files/drivers/usb
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-06-12 19:17:57 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-06-12 19:17:57 +0000
commit27e94101def26f60ce5f65835c082f791f6ed641 (patch)
tree7dcda6dd00b39a1cf0a038df25cca76a1b213a09 /target/linux/adm5120/files/drivers/usb
parent9f0d58cb15d8f345bfacb0b2e6f7aa86e62e1e31 (diff)
[adm5120] cleanup files using checkpatch.pl
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27162 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120/files/drivers/usb')
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c70
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-drv.c2
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c20
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-hub.c16
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-mem.c4
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120-q.c52
-rw-r--r--target/linux/adm5120/files/drivers/usb/host/adm5120.h16
7 files changed, 90 insertions, 90 deletions
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c
index ee148171a..34ee9414d 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-dbg.c
@@ -98,9 +98,9 @@ urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small, int status
"stat=%d\n",
str,
urb,
- usb_pipedevice (pipe),
- usb_pipeendpoint (pipe),
- usb_pipeout(pipe)? "out" : "in",
+ usb_pipedevice(pipe),
+ usb_pipeendpoint(pipe),
+ usb_pipeout(pipe) ? "out" : "in",
pipestring(pipe),
urb->transfer_flags,
urb->actual_length,
@@ -114,18 +114,18 @@ urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small, int status
if (usb_pipecontrol(pipe)) {
admhc_dbg(ahcd, "setup(8):");
for (i = 0; i < 8 ; i++)
- printk (" %02x", ((__u8 *) urb->setup_packet) [i]);
- printk ("\n");
+ printk(KERN_INFO" %02x", ((__u8 *)urb->setup_packet)[i]);
+ printk(KERN_INFO "\n");
}
if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) {
admhc_dbg(ahcd, "data(%d/%d):",
urb->actual_length,
urb->transfer_buffer_length);
- len = usb_pipeout(pipe)?
- urb->transfer_buffer_length: urb->actual_length;
+ len = usb_pipeout(pipe) ?
+ urb->transfer_buffer_length : urb->actual_length;
for (i = 0; i < 16 && i < len; i++)
- printk(" %02x", ((__u8 *)urb->transfer_buffer)[i]);
- printk("%s stat:%d\n", i < len? "...": "", status);
+ printk(KERN_INFO " %02x", ((__u8 *)urb->transfer_buffer)[i]);
+ printk(KERN_INFO "%s stat:%d\n", i < len ? "..." : "", status);
}
}
#endif /* ADMHC_VERBOSE_DEBUG */
@@ -133,12 +133,12 @@ urb_print(struct admhcd *ahcd, struct urb *urb, char *str, int small, int status
#define admhc_dbg_sw(ahcd, next, size, format, arg...) \
do { \
- if (next) { \
- unsigned s_len; \
- s_len = scnprintf(*next, *size, format, ## arg ); \
- *size -= s_len; *next += s_len; \
- } else \
- admhc_dbg(ahcd,format, ## arg ); \
+ if (next) { \
+ unsigned s_len; \
+ s_len = scnprintf(*next, *size, format, ## arg); \
+ *size -= s_len; *next += s_len; \
+ } else \
+ admhc_dbg(ahcd, format, ## arg); \
} while (0);
@@ -170,7 +170,7 @@ static void maybe_print_eds(struct admhcd *ahcd, char *label, u32 value,
admhc_dbg_sw(ahcd, next, size, "%s %08x\n", label, value);
}
-static char *buss2string (int state)
+static char *buss2string(int state)
{
switch (state) {
case ADMHC_BUSS_RESET:
@@ -220,7 +220,7 @@ admhc_dump_status(struct admhcd *ahcd, char **next, unsigned *size)
admhc_readl(ahcd, &regs->hosthead), next, size);
}
-#define dbg_port_sw(hc,num,value,next,size) \
+#define dbg_port_sw(hc, num, value, next, size) \
admhc_dbg_sw(hc, next, size, \
"portstatus [%d] " \
"0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \
@@ -286,7 +286,7 @@ static void admhc_dump(struct admhcd *ahcd, int verbose)
/* dumps some of the state we know about */
admhc_dump_status(ahcd, NULL, NULL);
- admhc_dbg(ahcd,"current frame #%04x\n",
+ admhc_dbg(ahcd, "current frame #%04x\n",
admhc_frame_no(ahcd));
admhc_dump_roothub(ahcd, verbose, NULL, NULL);
@@ -348,7 +348,7 @@ admhc_dump_ed(const struct admhcd *ahcd, const char *label,
tmp = hc32_to_cpup(ahcd, &ed->hwHeadP);
admhc_dbg(ahcd, " tds: head %08x tail %08x %s%s%s\n",
tmp & TD_MASK,
- hc32_to_cpup (ahcd, &ed->hwTailP),
+ hc32_to_cpup(ahcd, &ed->hwTailP),
(tmp & ED_C) ? data1 : data0,
(tmp & ED_H) ? " HALT" : "",
verbose ? " td list follows" : " (not listing)");
@@ -362,7 +362,7 @@ admhc_dump_ed(const struct admhcd *ahcd, const char *label,
list_for_each(tmp, &ed->td_list) {
struct td *td;
td = list_entry(tmp, struct td, td_list);
- admhc_dump_td (ahcd, " ->", td);
+ admhc_dump_td(ahcd, " ->", td);
}
}
}
@@ -447,7 +447,7 @@ show_list(struct admhcd *ahcd, char *buf, size_t count, struct ed *ed)
" h:%08x t:%08x",
ed,
ed_statestring(ed->state),
- ed_typestring (ed->type),
+ ed_typestring(ed->type),
(info & ED_SPEED_FULL) ? 'f' : 'l',
info & ED_FA_MASK,
(info >> ED_EN_SHIFT) & ED_EN_MASK,
@@ -458,7 +458,7 @@ show_list(struct admhcd *ahcd, char *buf, size_t count, struct ed *ed)
(info & ED_SKIP) ? " S" : "",
(headp & ED_H) ? " H" : "",
(headp & ED_C) ? data1 : data0,
- headp & ED_MASK,tailp);
+ headp & ED_MASK, tailp);
size -= temp;
buf += temp;
@@ -466,9 +466,9 @@ show_list(struct admhcd *ahcd, char *buf, size_t count, struct ed *ed)
u32 dbp, cbl;
td = list_entry(entry, struct td, td_list);
- info = hc32_to_cpup (ahcd, &td->hwINFO);
- dbp = hc32_to_cpup (ahcd, &td->hwDBP);
- cbl = hc32_to_cpup (ahcd, &td->hwCBL);
+ info = hc32_to_cpup(ahcd, &td->hwINFO);
+ dbp = hc32_to_cpup(ahcd, &td->hwDBP);
+ cbl = hc32_to_cpup(ahcd, &td->hwCBL);
temp = scnprintf(buf, size,
"\n\ttd/%p %s %d %s%scc=%x urb %p (%08x,%08x)",
@@ -477,7 +477,7 @@ show_list(struct admhcd *ahcd, char *buf, size_t count, struct ed *ed)
TD_BL_GET(cbl),
(info & TD_OWN) ? "" : "DONE ",
(cbl & TD_IE) ? "IE " : "",
- TD_CC_GET (info), td->urb, info, cbl);
+ TD_CC_GET(info), td->urb, info, cbl);
size -= temp;
buf += temp;
}
@@ -525,7 +525,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
char *next;
unsigned i;
- if (!(seen = kmalloc(DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC)))
+ seen = kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC);
+ if (!seen)
return 0;
seen_count = 0;
@@ -542,10 +543,11 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
/* dump a snapshot of the periodic schedule (and load) */
spin_lock_irqsave(&ahcd->lock, flags);
for (i = 0; i < NUM_INTS; i++) {
- if (!(ed = ahcd->periodic [i]))
+ ed = ahcd->periodic[i];
+ if (!ed)
continue;
- temp = scnprintf(next, size, "%2d [%3d]:", i, ahcd->load [i]);
+ temp = scnprintf(next, size, "%2d [%3d]:", i, ahcd->load[i]);
size -= temp;
next += temp;
@@ -555,18 +557,18 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
size -= temp;
next += temp;
for (temp = 0; temp < seen_count; temp++) {
- if (seen [temp] == ed)
+ if (seen[temp] == ed)
break;
}
/* show more info the first time around */
if (temp == seen_count) {
- u32 info = hc32_to_cpu (ahcd, ed->hwINFO);
+ u32 info = hc32_to_cpu(ahcd, ed->hwINFO);
struct list_head *entry;
unsigned qlen = 0;
/* qlen measured here in TDs, not urbs */
- list_for_each (entry, &ed->td_list)
+ list_for_each(entry, &ed->td_list)
qlen++;
temp = scnprintf(next, size,
" (%cs dev%d ep%d%s qlen %u"
@@ -586,7 +588,7 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
next += temp;
if (seen_count < DBG_SCHED_LIMIT)
- seen [seen_count++] = ed;
+ seen[seen_count++] = ed;
ed = ed->ed_next;
@@ -603,7 +605,7 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
next += temp;
}
spin_unlock_irqrestore(&ahcd->lock, flags);
- kfree (seen);
+ kfree(seen);
return PAGE_SIZE - size;
}
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-drv.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-drv.c
index 92971f240..5aa90d670 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-drv.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-drv.c
@@ -114,7 +114,7 @@ static void admhc_adm5120_remove(struct usb_hcd *hcd,
static int __devinit
admhc_adm5120_start(struct usb_hcd *hcd)
{
- struct admhcd *ahcd = hcd_to_admhcd (hcd);
+ struct admhcd *ahcd = hcd_to_admhcd(hcd);
int ret;
ret = admhc_init(ahcd);
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c
index 30310aa0c..041254647 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c
@@ -36,8 +36,8 @@
#include <linux/dmapool.h>
#include <linux/reboot.h>
#include <linux/debugfs.h>
+#include <linux/io.h>
-#include <asm/io.h>
#include <asm/irq.h>
#include <asm/system.h>
#include <asm/unaligned.h>
@@ -58,12 +58,12 @@
#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR
#define ADMHC_INTR_INIT \
- ( ADMHC_INTR_MIE | ADMHC_INTR_INSM | ADMHC_INTR_FATI \
- | ADMHC_INTR_RESI | ADMHC_INTR_TDC | ADMHC_INTR_BABI )
+ (ADMHC_INTR_MIE | ADMHC_INTR_INSM | ADMHC_INTR_FATI \
+ | ADMHC_INTR_RESI | ADMHC_INTR_TDC | ADMHC_INTR_BABI)
/*-------------------------------------------------------------------------*/
-static const char hcd_name [] = "admhc-hcd";
+static const char hcd_name[] = "admhc-hcd";
#define STATECHANGE_DELAY msecs_to_jiffies(300)
@@ -128,7 +128,7 @@ static int admhc_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0
&& (urb->transfer_buffer_length
% usb_maxpacket(urb->dev, pipe,
- usb_pipeout (pipe))) == 0)
+ usb_pipeout(pipe))) == 0)
td_cnt++;
break;
case PIPE_INTERRUPT:
@@ -302,8 +302,8 @@ sanitize:
goto rescan;
case ED_IDLE: /* fully unlinked */
if (list_empty(&ed->td_list)) {
- td_free (ahcd, ed->dummy);
- ed_free (ahcd, ed);
+ td_free(ahcd, ed->dummy);
+ ed_free(ahcd, ed);
break;
}
/* else FALL THROUGH */
@@ -340,7 +340,7 @@ static void admhc_usb_reset(struct admhcd *ahcd)
#else
/* FIXME */
ahcd->host_control = ADMHC_BUSS_RESET;
- admhc_writel(ahcd, ahcd->host_control ,&ahcd->regs->host_control);
+ admhc_writel(ahcd, ahcd->host_control, &ahcd->regs->host_control);
#endif
}
@@ -642,7 +642,7 @@ static irqreturn_t admhc_irq(struct usb_hcd *hcd)
{
struct admhcd *ahcd = hcd_to_admhcd(hcd);
struct admhcd_regs __iomem *regs = ahcd->regs;
- u32 ints;
+ u32 ints;
ints = admhc_readl(ahcd, &regs->int_status);
if ((ints & ADMHC_INTR_INTA) == 0) {
@@ -798,7 +798,7 @@ static int __init admhc_hcd_mod_init(void)
pr_info("%s: " DRIVER_INFO "\n", hcd_name);
pr_info("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
- sizeof (struct ed), sizeof (struct td));
+ sizeof(struct ed), sizeof(struct td));
#ifdef DEBUG
admhc_debug_root = debugfs_create_dir("admhc", NULL);
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-hub.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-hub.c
index ce454cb20..3c1ab652a 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-hub.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-hub.c
@@ -19,7 +19,7 @@
* ADM5120 Root Hub ... the nonsharable stuff
*/
-#define dbg_port(hc,label,num,value) \
+#define dbg_port(hc, label, num, value) \
admhc_dbg(hc, \
"%s port%d " \
"= 0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \
@@ -40,7 +40,7 @@
(value & ADMHC_PS_CCS) ? " CCS" : "" \
);
-#define dbg_port_write(hc,label,num,value) \
+#define dbg_port_write(hc, label, num, value) \
admhc_dbg(hc, \
"%s port%d " \
"= 0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \
@@ -81,11 +81,11 @@ admhc_hub_status_data(struct usb_hcd *hcd, char *buf)
/* init status */
status = admhc_read_rhdesc(ahcd);
if (status & (ADMHC_RH_LPSC | ADMHC_RH_OCIC))
- buf [0] = changed = 1;
+ buf[0] = changed = 1;
else
- buf [0] = 0;
+ buf[0] = 0;
if (ahcd->num_ports > 7) {
- buf [1] = 0;
+ buf[1] = 0;
length++;
}
@@ -100,9 +100,9 @@ admhc_hub_status_data(struct usb_hcd *hcd, char *buf)
| ADMHC_PS_OCIC | ADMHC_PS_PRSC)) {
changed = 1;
if (i < 7)
- buf [0] |= 1 << (i + 1);
+ buf[0] |= 1 << (i + 1);
else
- buf [1] |= 1 << (i - 7);
+ buf[1] |= 1 << (i - 7);
}
}
@@ -247,7 +247,7 @@ static void start_hnp(struct admhcd *ahcd);
#define PORT_RESET_HW_MSEC 10
/* wrap-aware logic morphed from <linux/jiffies.h> */
-#define tick_before(t1,t2) ((s16)(((s16)(t1))-((s16)(t2))) < 0)
+#define tick_before(t1, t2) ((s16)(((s16)(t1)) - ((s16)(t2))) < 0)
/* called from some task, normally khubd */
static inline int admhc_port_reset(struct admhcd *ahcd, unsigned port)
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-mem.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-mem.c
index da50d42eb..79fff70e2 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-mem.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-mem.c
@@ -125,10 +125,10 @@ static void td_free(struct admhcd *ahcd, struct td *td)
#if 0
/* TODO: remove */
else if ((td->hwINFO & cpu_to_hc32(ahcd, TD_DONE)) != 0)
- admhc_dbg (ahcd, "no hash for td %p\n", td);
+ admhc_dbg(ahcd, "no hash for td %p\n", td);
#else
else if ((td->flags & TD_FLAG_DONE) != 0)
- admhc_dbg (ahcd, "no hash for td %p\n", td);
+ admhc_dbg(ahcd, "no hash for td %p\n", td);
#endif
dma_pool_free(ahcd->td_cache, td, td->td_dma);
}
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-q.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-q.c
index 4c742c0f3..5d95ab1b1 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120-q.c
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-q.c
@@ -42,7 +42,7 @@ __acquires(ahcd->lock)
}
#ifdef ADMHC_VERBOSE_DEBUG
- urb_print(ahcd, urb, "RET", usb_pipeout (urb->pipe), status);
+ urb_print(ahcd, urb, "RET", usb_pipeout(urb->pipe), status);
#endif
/* urb->complete() can reenter this HCD */
@@ -73,12 +73,12 @@ static int balance(struct admhcd *ahcd, int interval, int load)
* that has enough bandwidth left unreserved.
*/
for (i = 0; i < interval ; i++) {
- if (branch < 0 || ahcd->load [branch] > ahcd->load [i]) {
+ if (branch < 0 || ahcd->load[branch] > ahcd->load[i]) {
int j;
/* usb 1.1 says 90% of one frame */
for (j = i; j < NUM_INTS; j += interval) {
- if ((ahcd->load [j] + load) > 900)
+ if ((ahcd->load[j] + load) > 900)
break;
}
if (j < NUM_INTS)
@@ -97,17 +97,17 @@ static int balance(struct admhcd *ahcd, int interval, int load)
* into the schedule tree in the apppropriate place. most iso devices use
* 1msec periods, but that's not required.
*/
-static void periodic_link (struct admhcd *ahcd, struct ed *ed)
+static void periodic_link(struct admhcd *ahcd, struct ed *ed)
{
unsigned i;
- admhc_vdbg (ahcd, "link %sed %p branch %d [%dus.], interval %d\n",
+ admhc_vdbg(ahcd, "link %sed %p branch %d [%dus.], interval %d\n",
(ed->hwINFO & cpu_to_hc32(ahcd, ED_ISO)) ? "iso " : "",
ed, ed->branch, ed->load, ed->interval);
for (i = ed->branch; i < NUM_INTS; i += ed->interval) {
- struct ed **prev = &ahcd->periodic [i];
- __hc32 *prev_p = &ahcd->hcca->int_table [i];
+ struct ed **prev = &ahcd->periodic[i];
+ __hc32 *prev_p = &ahcd->hcca->int_table[i];
struct ed *here = *prev;
/* sorting each branch by period (slow before fast)
@@ -125,12 +125,12 @@ static void periodic_link (struct admhcd *ahcd, struct ed *ed)
ed->ed_next = here;
if (here)
ed->hwNextED = *prev_p;
- wmb ();
+ wmb();
*prev = ed;
*prev_p = cpu_to_hc32(ahcd, ed->dma);
wmb();
}
- ahcd->load [i] += ed->load;
+ ahcd->load[i] += ed->load;
}
admhcd_to_hcd(ahcd)->self.bandwidth_allocated += ed->load / ed->interval;
}
@@ -170,14 +170,14 @@ static int ed_schedule(struct admhcd *ahcd, struct ed *ed)
#if 0 /* FIXME */
/* scan the periodic table to find and unlink this ED */
-static void periodic_unlink (struct admhcd *ahcd, struct ed *ed)
+static void periodic_unlink(struct admhcd *ahcd, struct ed *ed)
{
int i;
for (i = ed->branch; i < NUM_INTS; i += ed->interval) {
struct ed *temp;
- struct ed **prev = &ahcd->periodic [i];
- __hc32 *prev_p = &ahcd->hcca->int_table [i];
+ struct ed **prev = &ahcd->periodic[i];
+ __hc32 *prev_p = &ahcd->hcca->int_table[i];
while (*prev && (temp = *prev) != ed) {
prev_p = &temp->hwNextED;
@@ -187,11 +187,11 @@ static void periodic_unlink (struct admhcd *ahcd, struct ed *ed)
*prev_p = ed->hwNextED;
*prev = ed->ed_next;
}
- ahcd->load [i] -= ed->load;
+ ahcd->load[i] -= ed->load;
}
admhcd_to_hcd(ahcd)->self.bandwidth_allocated -= ed->load / ed->interval;
- admhc_vdbg (ahcd, "unlink %sed %p branch %d [%dus.], interval %d\n",
+ admhc_vdbg(ahcd, "unlink %sed %p branch %d [%dus.], interval %d\n",
(ed->hwINFO & cpu_to_hc32(ahcd, ED_ISO)) ? "iso " : "",
ed, ed->branch, ed->load, ed->interval);
}
@@ -596,7 +596,7 @@ static int td_done(struct admhcd *ahcd, struct urb *urb, struct td *td)
urb->iso_frame_desc[td->index].status = cc_to_error[cc];
if (cc != TD_CC_NOERROR)
- admhc_vdbg (ahcd,
+ admhc_vdbg(ahcd,
"urb %p iso td %p (%d) len %d cc %d\n",
urb, td, 1 + td->index, dlen, cc);
@@ -615,9 +615,8 @@ static int td_done(struct admhcd *ahcd, struct urb *urb, struct td *td)
/* count all non-empty packets except control SETUP packet */
- if ((type != PIPE_CONTROL || td->index != 0) && tdDBP != 0) {
+ if ((type != PIPE_CONTROL || td->index != 0) && tdDBP != 0)
urb->actual_length += tdDBP - td->data_dma + bl;
- }
if (cc != TD_CC_NOERROR && cc < TD_CC_HCD0)
admhc_vdbg(ahcd,
@@ -691,13 +690,13 @@ ed_halted(struct admhcd *ahcd, struct td *td, int cc, struct td *rev)
break;
/* fallthrough */
default:
- admhc_dbg (ahcd,
+ admhc_dbg(ahcd,
"urb %p path %s ep%d%s %08x cc %d --> status %d\n",
urb, urb->dev->devpath,
usb_pipeendpoint (urb->pipe),
- usb_pipein (urb->pipe) ? "in" : "out",
+ usb_pipein(urb->pipe) ? "in" : "out",
hc32_to_cpu(ahcd, td->hwINFO),
- cc, cc_to_error [cc]);
+ cc, cc_to_error[cc]);
}
}
@@ -719,11 +718,10 @@ rescan_all:
* frame counter wraps and EDs with partially retired TDs
*/
if (likely(HC_IS_RUNNING(admhcd_to_hcd(ahcd)->state))) {
- if (tick_before (tick, ed->tick)) {
+ if (tick_before(tick, ed->tick))
skip_ed:
last = &ed->ed_rm_next;
continue;
- }
#if 0
if (!list_empty(&ed->td_list)) {
struct td *td;
@@ -828,7 +826,7 @@ rescan_this:
static void ed_unhalt(struct admhcd *ahcd, struct ed *ed, struct urb *urb)
{
- struct list_head *entry,*tmp;
+ struct list_head *entry, *tmp;
__hc32 toggle = ed->hwHeadP & cpu_to_hc32(ahcd, ED_C);
#ifdef ADMHC_VERBOSE_DEBUG
@@ -880,7 +878,7 @@ static inline int is_td_halted(struct admhcd *ahcd, struct ed *ed,
static void ed_update(struct admhcd *ahcd, struct ed *ed)
{
- struct list_head *entry,*tmp;
+ struct list_head *entry, *tmp;
#ifdef ADMHC_VERBOSE_DEBUG
admhc_dump_ed(ahcd, "UPDATE", ed, 1);
@@ -901,7 +899,7 @@ static void ed_update(struct admhcd *ahcd, struct ed *ed)
ed_unhalt(ahcd, ed, urb);
if (ed->type == PIPE_INTERRUPT)
- ed_intr_refill(ahcd,ed);
+ ed_intr_refill(ahcd, ed);
/* If all this urb's TDs are done, call complete() */
if (urb_priv->td_idx == urb_priv->td_cnt)
@@ -923,11 +921,11 @@ static void ed_update(struct admhcd *ahcd, struct ed *ed)
/* ... hc may need waking-up */
switch (ed->type) {
case PIPE_CONTROL:
- admhc_writel (ahcd, OHCI_CLF,
+ admhc_writel(ahcd, OHCI_CLF,
&ahcd->regs->cmdstatus);
break;
case PIPE_BULK:
- admhc_writel (ahcd, OHCI_BLF,
+ admhc_writel(ahcd, OHCI_BLF,
&ahcd->regs->cmdstatus);
break;
}
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120.h b/target/linux/adm5120/files/drivers/usb/host/adm5120.h
index 7c47cb8b7..52fe039f4 100644
--- a/target/linux/adm5120/files/drivers/usb/host/adm5120.h
+++ b/target/linux/adm5120/files/drivers/usb/host/adm5120.h
@@ -187,7 +187,7 @@ struct td {
/* map OHCI TD status codes (CC) to errno values */
-static const int cc_to_error [16] = {
+static const int cc_to_error[16] = {
/* No Error */ 0,
/* CRC Error */ -EILSEQ,
/* Bit Stuff */ -EPROTO,
@@ -430,7 +430,7 @@ struct admhcd {
#define OHCI_QUIRK_BE_DESC 0x08 /* BE descriptors */
#define OHCI_QUIRK_BE_MMIO 0x10 /* BE registers */
#define OHCI_QUIRK_ZFMICRO 0x20 /* Compaq ZFMicro chipset*/
- // there are also chip quirks/bugs in init logic
+ /* there are also chip quirks/bugs in init logic */
#ifdef DEBUG
struct dentry *debug_dir;
@@ -458,17 +458,17 @@ static inline struct usb_hcd *admhcd_to_hcd(const struct admhcd *ahcd)
#ifdef DEBUG
# define admhc_dbg(ahcd, fmt, args...) \
- printk(KERN_DEBUG "adm5120-hcd: " fmt , ## args )
+ printk(KERN_DEBUG "adm5120-hcd: " fmt, ## args)
#else
# define admhc_dbg(ahcd, fmt, args...) do { } while (0)
#endif
#define admhc_err(ahcd, fmt, args...) \
- printk(KERN_ERR "adm5120-hcd: " fmt , ## args )
+ printk(KERN_ERR "adm5120-hcd: " fmt, ## args)
#define admhc_info(ahcd, fmt, args...) \
- printk(KERN_INFO "adm5120-hcd: " fmt , ## args )
+ printk(KERN_INFO "adm5120-hcd: " fmt, ## args)
#define admhc_warn(ahcd, fmt, args...) \
- printk(KERN_WARNING "adm5120-hcd: " fmt , ## args )
+ printk(KERN_WARNING "adm5120-hcd: " fmt, ## args)
#ifdef ADMHC_VERBOSE_DEBUG
# define admhc_vdbg admhc_dbg
@@ -745,7 +745,7 @@ static inline void admhc_dma_enable(struct admhcd *ahcd)
t |= ADMHC_HC_DMAE;
admhc_writel(ahcd, t, &ahcd->regs->host_control);
- admhc_vdbg(ahcd,"DMA enabled\n");
+ admhc_vdbg(ahcd, "DMA enabled\n");
}
static inline void admhc_dma_disable(struct admhcd *ahcd)
@@ -758,5 +758,5 @@ static inline void admhc_dma_disable(struct admhcd *ahcd)
t &= ~ADMHC_HC_DMAE;
admhc_writel(ahcd, t, &ahcd->regs->host_control);
- admhc_vdbg(ahcd,"DMA disabled\n");
+ admhc_vdbg(ahcd, "DMA disabled\n");
}