diff options
author | Tobias Ollmann <tobias.ollmann@gmx.at> | 2010-12-25 05:17:01 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-22 22:35:39 -0500 |
commit | 0828376deadb93f2e839900065f536ddc1190e73 (patch) | |
tree | b05802f8f5c28f2a7bcc16c67efccc32778e22bf /drivers/usb/core | |
parent | 60678b60d78cd268a3aed3044dfbbb85760b2c54 (diff) |
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>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/buffer.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 2c6965484fe..b0585e623ba 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <asm/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/dmapool.h> | 15 | #include <linux/dmapool.h> |
16 | #include <linux/usb.h> | 16 | #include <linux/usb.h> |
@@ -22,7 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* FIXME tune these based on pool statistics ... */ | 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 | /* platforms without dma-friendly caches might need to | 26 | /* platforms without dma-friendly caches might need to |
27 | * prevent cacheline sharing... | 27 | * prevent cacheline sharing... |
28 | */ | 28 | */ |
@@ -51,7 +51,7 @@ static const size_t pool_max [HCD_BUFFER_POOLS] = { | |||
51 | int hcd_buffer_create(struct usb_hcd *hcd) | 51 | int hcd_buffer_create(struct usb_hcd *hcd) |
52 | { | 52 | { |
53 | char name[16]; | 53 | char name[16]; |
54 | int i, size; | 54 | int i, size; |
55 | 55 | ||
56 | if (!hcd->self.controller->dma_mask && | 56 | if (!hcd->self.controller->dma_mask && |
57 | !(hcd->driver->flags & HCD_LOCAL_MEM)) | 57 | !(hcd->driver->flags & HCD_LOCAL_MEM)) |
@@ -64,7 +64,7 @@ int hcd_buffer_create(struct usb_hcd *hcd) | |||
64 | snprintf(name, sizeof name, "buffer-%d", size); | 64 | snprintf(name, sizeof name, "buffer-%d", size); |
65 | hcd->pool[i] = dma_pool_create(name, hcd->self.controller, | 65 | hcd->pool[i] = dma_pool_create(name, hcd->self.controller, |
66 | size, size, 0); | 66 | size, size, 0); |
67 | if (!hcd->pool [i]) { | 67 | if (!hcd->pool[i]) { |
68 | hcd_buffer_destroy(hcd); | 68 | hcd_buffer_destroy(hcd); |
69 | return -ENOMEM; | 69 | return -ENOMEM; |
70 | } | 70 | } |
@@ -99,14 +99,14 @@ void hcd_buffer_destroy(struct usb_hcd *hcd) | |||
99 | */ | 99 | */ |
100 | 100 | ||
101 | void *hcd_buffer_alloc( | 101 | void *hcd_buffer_alloc( |
102 | struct usb_bus *bus, | 102 | struct usb_bus *bus, |
103 | size_t size, | 103 | size_t size, |
104 | gfp_t mem_flags, | 104 | gfp_t mem_flags, |
105 | dma_addr_t *dma | 105 | dma_addr_t *dma |
106 | ) | 106 | ) |
107 | { | 107 | { |
108 | struct usb_hcd *hcd = bus_to_hcd(bus); | 108 | struct usb_hcd *hcd = bus_to_hcd(bus); |
109 | int i; | 109 | int i; |
110 | 110 | ||
111 | /* some USB hosts just use PIO */ | 111 | /* some USB hosts just use PIO */ |
112 | if (!bus->controller->dma_mask && | 112 | if (!bus->controller->dma_mask && |
@@ -116,21 +116,21 @@ void *hcd_buffer_alloc( | |||
116 | } | 116 | } |
117 | 117 | ||
118 | for (i = 0; i < HCD_BUFFER_POOLS; i++) { | 118 | for (i = 0; i < HCD_BUFFER_POOLS; i++) { |
119 | if (size <= pool_max [i]) | 119 | if (size <= pool_max[i]) |
120 | return dma_pool_alloc(hcd->pool [i], mem_flags, dma); | 120 | return dma_pool_alloc(hcd->pool[i], mem_flags, dma); |
121 | } | 121 | } |
122 | return dma_alloc_coherent(hcd->self.controller, size, dma, mem_flags); | 122 | return dma_alloc_coherent(hcd->self.controller, size, dma, mem_flags); |
123 | } | 123 | } |
124 | 124 | ||
125 | void hcd_buffer_free( | 125 | void hcd_buffer_free( |
126 | struct usb_bus *bus, | 126 | struct usb_bus *bus, |
127 | size_t size, | 127 | size_t size, |
128 | void *addr, | 128 | void *addr, |
129 | dma_addr_t dma | 129 | dma_addr_t dma |
130 | ) | 130 | ) |
131 | { | 131 | { |
132 | struct usb_hcd *hcd = bus_to_hcd(bus); | 132 | struct usb_hcd *hcd = bus_to_hcd(bus); |
133 | int i; | 133 | int i; |
134 | 134 | ||
135 | if (!addr) | 135 | if (!addr) |
136 | return; | 136 | return; |
@@ -142,8 +142,8 @@ void hcd_buffer_free( | |||
142 | } | 142 | } |
143 | 143 | ||
144 | for (i = 0; i < HCD_BUFFER_POOLS; i++) { | 144 | for (i = 0; i < HCD_BUFFER_POOLS; i++) { |
145 | if (size <= pool_max [i]) { | 145 | if (size <= pool_max[i]) { |
146 | dma_pool_free(hcd->pool [i], addr, dma); | 146 | dma_pool_free(hcd->pool[i], addr, dma); |
147 | return; | 147 | return; |
148 | } | 148 | } |
149 | } | 149 | } |