diff options
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/at_hdmac.c | 1 | ||||
-rw-r--r-- | drivers/dma/coh901318_lli.c | 1 | ||||
-rw-r--r-- | drivers/dma/dmaengine.c | 1 | ||||
-rw-r--r-- | drivers/dma/dmatest.c | 1 | ||||
-rw-r--r-- | drivers/dma/fsldma.c | 1 | ||||
-rw-r--r-- | drivers/dma/ioat/dma.c | 1 | ||||
-rw-r--r-- | drivers/dma/ioat/dma_v2.c | 1 | ||||
-rw-r--r-- | drivers/dma/ioat/dma_v3.c | 1 | ||||
-rw-r--r-- | drivers/dma/ioat/pci.c | 1 | ||||
-rw-r--r-- | drivers/dma/iop-adma.c | 1 | ||||
-rw-r--r-- | drivers/dma/iovlock.c | 1 | ||||
-rw-r--r-- | drivers/dma/mpc512x_dma.c | 1 | ||||
-rw-r--r-- | drivers/dma/mv_xor.c | 1 | ||||
-rw-r--r-- | drivers/dma/ppc4xx/adma.c | 1 | ||||
-rw-r--r-- | drivers/dma/shdma.c | 28 |
15 files changed, 36 insertions, 6 deletions
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index efc1a61ca231..278cf5bceef2 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "at_hdmac_regs.h" | 27 | #include "at_hdmac_regs.h" |
27 | 28 | ||
diff --git a/drivers/dma/coh901318_lli.c b/drivers/dma/coh901318_lli.c index 71d58c1a1e86..9f7e0e6a7eea 100644 --- a/drivers/dma/coh901318_lli.c +++ b/drivers/dma/coh901318_lli.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
12 | #include <linux/dmapool.h> | 12 | #include <linux/dmapool.h> |
13 | #include <linux/memory.h> | 13 | #include <linux/memory.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <mach/coh901318.h> | 15 | #include <mach/coh901318.h> |
15 | 16 | ||
16 | #include "coh901318_lli.h" | 17 | #include "coh901318_lli.h" |
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 87399cafce37..d18b5d069d7e 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/jiffies.h> | 58 | #include <linux/jiffies.h> |
59 | #include <linux/rculist.h> | 59 | #include <linux/rculist.h> |
60 | #include <linux/idr.h> | 60 | #include <linux/idr.h> |
61 | #include <linux/slab.h> | ||
61 | 62 | ||
62 | static DEFINE_MUTEX(dma_list_mutex); | 63 | static DEFINE_MUTEX(dma_list_mutex); |
63 | static LIST_HEAD(dma_device_list); | 64 | static LIST_HEAD(dma_device_list); |
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 6fa55fe3dd24..68d58c414cf0 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
16 | #include <linux/random.h> | 16 | #include <linux/random.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/wait.h> | 18 | #include <linux/wait.h> |
18 | 19 | ||
19 | static unsigned int test_buf_size = 16384; | 20 | static unsigned int test_buf_size = 16384; |
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index bbb4be5a3ff4..88f470f0d820 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
31 | #include <linux/dmaengine.h> | 32 | #include <linux/dmaengine.h> |
32 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 0099340b9616..3e5a8005c62b 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
31 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
32 | #include <linux/dmaengine.h> | 33 | #include <linux/dmaengine.h> |
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c index 1ed5d66d7dca..b5ae56c211e6 100644 --- a/drivers/dma/ioat/dma_v2.c +++ b/drivers/dma/ioat/dma_v2.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
31 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
32 | #include <linux/dmaengine.h> | 33 | #include <linux/dmaengine.h> |
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c index 26febc56dab1..6740e319c9cf 100644 --- a/drivers/dma/ioat/dma_v3.c +++ b/drivers/dma/ioat/dma_v3.c | |||
@@ -57,6 +57,7 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <linux/pci.h> | 59 | #include <linux/pci.h> |
60 | #include <linux/gfp.h> | ||
60 | #include <linux/dmaengine.h> | 61 | #include <linux/dmaengine.h> |
61 | #include <linux/dma-mapping.h> | 62 | #include <linux/dma-mapping.h> |
62 | #include "registers.h" | 63 | #include "registers.h" |
diff --git a/drivers/dma/ioat/pci.c b/drivers/dma/ioat/pci.c index d545fae30f37..99ec26725bae 100644 --- a/drivers/dma/ioat/pci.c +++ b/drivers/dma/ioat/pci.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/dca.h> | 32 | #include <linux/dca.h> |
33 | #include <linux/slab.h> | ||
33 | #include "dma.h" | 34 | #include "dma.h" |
34 | #include "dma_v2.h" | 35 | #include "dma_v2.h" |
35 | #include "registers.h" | 36 | #include "registers.h" |
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index ca6e6a0cb793..1ebc801678b0 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/memory.h> | 32 | #include <linux/memory.h> |
33 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
34 | #include <linux/raid/pq.h> | 34 | #include <linux/raid/pq.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <mach/adma.h> | 37 | #include <mach/adma.h> |
37 | 38 | ||
diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c index c0a272c73682..bb48a57c2fc1 100644 --- a/drivers/dma/iovlock.c +++ b/drivers/dma/iovlock.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/dmaengine.h> | 28 | #include <linux/dmaengine.h> |
29 | #include <linux/pagemap.h> | 29 | #include <linux/pagemap.h> |
30 | #include <linux/slab.h> | ||
30 | #include <net/tcp.h> /* for memcpy_toiovec */ | 31 | #include <net/tcp.h> /* for memcpy_toiovec */ |
31 | #include <asm/io.h> | 32 | #include <asm/io.h> |
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 3fdf1f46bd63..bbbd58566625 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |
38 | #include <linux/interrupt.h> | 38 | #include <linux/interrupt.h> |
39 | #include <linux/io.h> | 39 | #include <linux/io.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/of_device.h> | 41 | #include <linux/of_device.h> |
41 | #include <linux/of_platform.h> | 42 | #include <linux/of_platform.h> |
42 | 43 | ||
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 466ab10c1ff1..e2fd34da64f2 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/dma-mapping.h> | 23 | #include <linux/dma-mapping.h> |
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c index e69d87f24a25..d44626fa35ad 100644 --- a/drivers/dma/ppc4xx/adma.c +++ b/drivers/dma/ppc4xx/adma.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/dma-mapping.h> | 38 | #include <linux/dma-mapping.h> |
39 | #include <linux/spinlock.h> | 39 | #include <linux/spinlock.h> |
40 | #include <linux/interrupt.h> | 40 | #include <linux/interrupt.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/uaccess.h> | 42 | #include <linux/uaccess.h> |
42 | #include <linux/proc_fs.h> | 43 | #include <linux/proc_fs.h> |
43 | #include <linux/of.h> | 44 | #include <linux/of.h> |
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index aab352a63a4a..323afef77802 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
23 | #include <linux/dmaengine.h> | 24 | #include <linux/dmaengine.h> |
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
@@ -288,6 +289,7 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan) | |||
288 | struct sh_dmae_chan *sh_chan = to_sh_chan(chan); | 289 | struct sh_dmae_chan *sh_chan = to_sh_chan(chan); |
289 | struct sh_desc *desc; | 290 | struct sh_desc *desc; |
290 | struct sh_dmae_slave *param = chan->private; | 291 | struct sh_dmae_slave *param = chan->private; |
292 | int ret; | ||
291 | 293 | ||
292 | pm_runtime_get_sync(sh_chan->dev); | 294 | pm_runtime_get_sync(sh_chan->dev); |
293 | 295 | ||
@@ -299,11 +301,15 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan) | |||
299 | const struct sh_dmae_slave_config *cfg; | 301 | const struct sh_dmae_slave_config *cfg; |
300 | 302 | ||
301 | cfg = sh_dmae_find_slave(sh_chan, param); | 303 | cfg = sh_dmae_find_slave(sh_chan, param); |
302 | if (!cfg) | 304 | if (!cfg) { |
303 | return -EINVAL; | 305 | ret = -EINVAL; |
306 | goto efindslave; | ||
307 | } | ||
304 | 308 | ||
305 | if (test_and_set_bit(param->slave_id, sh_dmae_slave_used)) | 309 | if (test_and_set_bit(param->slave_id, sh_dmae_slave_used)) { |
306 | return -EBUSY; | 310 | ret = -EBUSY; |
311 | goto etestused; | ||
312 | } | ||
307 | 313 | ||
308 | param->config = cfg; | 314 | param->config = cfg; |
309 | 315 | ||
@@ -332,10 +338,20 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan) | |||
332 | } | 338 | } |
333 | spin_unlock_bh(&sh_chan->desc_lock); | 339 | spin_unlock_bh(&sh_chan->desc_lock); |
334 | 340 | ||
335 | if (!sh_chan->descs_allocated) | 341 | if (!sh_chan->descs_allocated) { |
336 | pm_runtime_put(sh_chan->dev); | 342 | ret = -ENOMEM; |
343 | goto edescalloc; | ||
344 | } | ||
337 | 345 | ||
338 | return sh_chan->descs_allocated; | 346 | return sh_chan->descs_allocated; |
347 | |||
348 | edescalloc: | ||
349 | if (param) | ||
350 | clear_bit(param->slave_id, sh_dmae_slave_used); | ||
351 | etestused: | ||
352 | efindslave: | ||
353 | pm_runtime_put(sh_chan->dev); | ||
354 | return ret; | ||
339 | } | 355 | } |
340 | 356 | ||
341 | /* | 357 | /* |