Commit 0828376deadb93f2e839900065f536ddc1190e73
Committed by
Greg Kroah-Hartman
1 parent
60678b60d7
Exists in
master
and in
7 other branches
USB: Core: Fix minor coding style issues
Fixing all coding style issues in buffer.c Signed-off-by: Tobias Ollmann <tobias.ollmann@gmx.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 1 changed file with 13 additions and 13 deletions Side-by-side Diff
drivers/usb/core/buffer.c
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | #include <linux/slab.h> |
11 | 11 | #include <linux/device.h> |
12 | 12 | #include <linux/mm.h> |
13 | -#include <asm/io.h> | |
13 | +#include <linux/io.h> | |
14 | 14 | #include <linux/dma-mapping.h> |
15 | 15 | #include <linux/dmapool.h> |
16 | 16 | #include <linux/usb.h> |
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | */ |
23 | 23 | |
24 | 24 | /* FIXME tune these based on pool statistics ... */ |
25 | -static const size_t pool_max [HCD_BUFFER_POOLS] = { | |
25 | +static const size_t pool_max[HCD_BUFFER_POOLS] = { | |
26 | 26 | /* platforms without dma-friendly caches might need to |
27 | 27 | * prevent cacheline sharing... |
28 | 28 | */ |
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | int hcd_buffer_create(struct usb_hcd *hcd) |
52 | 52 | { |
53 | 53 | char name[16]; |
54 | - int i, size; | |
54 | + int i, size; | |
55 | 55 | |
56 | 56 | if (!hcd->self.controller->dma_mask && |
57 | 57 | !(hcd->driver->flags & HCD_LOCAL_MEM)) |
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 | snprintf(name, sizeof name, "buffer-%d", size); |
65 | 65 | hcd->pool[i] = dma_pool_create(name, hcd->self.controller, |
66 | 66 | size, size, 0); |
67 | - if (!hcd->pool [i]) { | |
67 | + if (!hcd->pool[i]) { | |
68 | 68 | hcd_buffer_destroy(hcd); |
69 | 69 | return -ENOMEM; |
70 | 70 | } |
71 | 71 | |
... | ... | @@ -99,14 +99,14 @@ |
99 | 99 | */ |
100 | 100 | |
101 | 101 | void *hcd_buffer_alloc( |
102 | - struct usb_bus *bus, | |
102 | + struct usb_bus *bus, | |
103 | 103 | size_t size, |
104 | 104 | gfp_t mem_flags, |
105 | 105 | dma_addr_t *dma |
106 | 106 | ) |
107 | 107 | { |
108 | 108 | struct usb_hcd *hcd = bus_to_hcd(bus); |
109 | - int i; | |
109 | + int i; | |
110 | 110 | |
111 | 111 | /* some USB hosts just use PIO */ |
112 | 112 | if (!bus->controller->dma_mask && |
113 | 113 | |
114 | 114 | |
115 | 115 | |
... | ... | @@ -116,21 +116,21 @@ |
116 | 116 | } |
117 | 117 | |
118 | 118 | for (i = 0; i < HCD_BUFFER_POOLS; i++) { |
119 | - if (size <= pool_max [i]) | |
120 | - return dma_pool_alloc(hcd->pool [i], mem_flags, dma); | |
119 | + if (size <= pool_max[i]) | |
120 | + return dma_pool_alloc(hcd->pool[i], mem_flags, dma); | |
121 | 121 | } |
122 | 122 | return dma_alloc_coherent(hcd->self.controller, size, dma, mem_flags); |
123 | 123 | } |
124 | 124 | |
125 | 125 | void hcd_buffer_free( |
126 | - struct usb_bus *bus, | |
126 | + struct usb_bus *bus, | |
127 | 127 | size_t size, |
128 | - void *addr, | |
128 | + void *addr, | |
129 | 129 | dma_addr_t dma |
130 | 130 | ) |
131 | 131 | { |
132 | 132 | struct usb_hcd *hcd = bus_to_hcd(bus); |
133 | - int i; | |
133 | + int i; | |
134 | 134 | |
135 | 135 | if (!addr) |
136 | 136 | return; |
... | ... | @@ -142,8 +142,8 @@ |
142 | 142 | } |
143 | 143 | |
144 | 144 | for (i = 0; i < HCD_BUFFER_POOLS; i++) { |
145 | - if (size <= pool_max [i]) { | |
146 | - dma_pool_free(hcd->pool [i], addr, dma); | |
145 | + if (size <= pool_max[i]) { | |
146 | + dma_pool_free(hcd->pool[i], addr, dma); | |
147 | 147 | return; |
148 | 148 | } |
149 | 149 | } |