diff options
author | Olof Johansson <olof@lixom.net> | 2013-06-25 14:20:15 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-06-25 14:20:15 -0400 |
commit | 5c913a9a9772f4b434aaea7328836419287b5d1c (patch) | |
tree | 8b1eaab977412ec85f1832759d63dedaf843060e /drivers/dma | |
parent | e7692e2cfd51324dad04273c97f025eaa3899aff (diff) | |
parent | 06568483297739f6ce8f2d25983f88dd8b563a9d (diff) |
Merge tag 'ux500-dma40-for-arm-soc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/drivers
From Linus Walleij:
DMA40 fixes for earlier submitted driver patches:
- Fix various error path and sparse bugs in the DMA40 driver
- Fix various compile errors in the ux500 crypto driver
(dependent on the DMA40 changes).
* tag 'ux500-dma40-for-arm-soc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
crypto: ux500: use dmaengine_submit API
crypto: ux500: use dmaengine_prep_slave_sg API
crypto: ux500: use dmaengine_device_control API
crypto: ux500/crypt: add missing __iomem qualifiers
crypto: ux500/hash: add missing static qualifiers
crypto: ux500/hash: use readl on iomem addresses
dmaengine: ste_dma40: Declare memcpy config as static
dmaengine: ste_dma40: fix error return code in d40_probe()
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/ste_dma40.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index fa4f9a33a74d..5ab5880d5c90 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -78,7 +78,7 @@ static int dma40_memcpy_channels[] = { | |||
78 | }; | 78 | }; |
79 | 79 | ||
80 | /* Default configuration for physcial memcpy */ | 80 | /* Default configuration for physcial memcpy */ |
81 | struct stedma40_chan_cfg dma40_memcpy_conf_phy = { | 81 | static struct stedma40_chan_cfg dma40_memcpy_conf_phy = { |
82 | .mode = STEDMA40_MODE_PHYSICAL, | 82 | .mode = STEDMA40_MODE_PHYSICAL, |
83 | .dir = DMA_MEM_TO_MEM, | 83 | .dir = DMA_MEM_TO_MEM, |
84 | 84 | ||
@@ -92,7 +92,7 @@ struct stedma40_chan_cfg dma40_memcpy_conf_phy = { | |||
92 | }; | 92 | }; |
93 | 93 | ||
94 | /* Default configuration for logical memcpy */ | 94 | /* Default configuration for logical memcpy */ |
95 | struct stedma40_chan_cfg dma40_memcpy_conf_log = { | 95 | static struct stedma40_chan_cfg dma40_memcpy_conf_log = { |
96 | .mode = STEDMA40_MODE_LOGICAL, | 96 | .mode = STEDMA40_MODE_LOGICAL, |
97 | .dir = DMA_MEM_TO_MEM, | 97 | .dir = DMA_MEM_TO_MEM, |
98 | 98 | ||
@@ -3537,7 +3537,6 @@ static int __init d40_probe(struct platform_device *pdev) | |||
3537 | { | 3537 | { |
3538 | struct stedma40_platform_data *plat_data = pdev->dev.platform_data; | 3538 | struct stedma40_platform_data *plat_data = pdev->dev.platform_data; |
3539 | struct device_node *np = pdev->dev.of_node; | 3539 | struct device_node *np = pdev->dev.of_node; |
3540 | int err; | ||
3541 | int ret = -ENOENT; | 3540 | int ret = -ENOENT; |
3542 | struct d40_base *base = NULL; | 3541 | struct d40_base *base = NULL; |
3543 | struct resource *res = NULL; | 3542 | struct resource *res = NULL; |
@@ -3649,6 +3648,7 @@ static int __init d40_probe(struct platform_device *pdev) | |||
3649 | base->lcpa_regulator = regulator_get(base->dev, "lcla_esram"); | 3648 | base->lcpa_regulator = regulator_get(base->dev, "lcla_esram"); |
3650 | if (IS_ERR(base->lcpa_regulator)) { | 3649 | if (IS_ERR(base->lcpa_regulator)) { |
3651 | d40_err(&pdev->dev, "Failed to get lcpa_regulator\n"); | 3650 | d40_err(&pdev->dev, "Failed to get lcpa_regulator\n"); |
3651 | ret = PTR_ERR(base->lcpa_regulator); | ||
3652 | base->lcpa_regulator = NULL; | 3652 | base->lcpa_regulator = NULL; |
3653 | goto failure; | 3653 | goto failure; |
3654 | } | 3654 | } |
@@ -3664,13 +3664,13 @@ static int __init d40_probe(struct platform_device *pdev) | |||
3664 | } | 3664 | } |
3665 | 3665 | ||
3666 | base->initialized = true; | 3666 | base->initialized = true; |
3667 | err = d40_dmaengine_init(base, num_reserved_chans); | 3667 | ret = d40_dmaengine_init(base, num_reserved_chans); |
3668 | if (err) | 3668 | if (ret) |
3669 | goto failure; | 3669 | goto failure; |
3670 | 3670 | ||
3671 | base->dev->dma_parms = &base->dma_parms; | 3671 | base->dev->dma_parms = &base->dma_parms; |
3672 | err = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE); | 3672 | ret = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE); |
3673 | if (err) { | 3673 | if (ret) { |
3674 | d40_err(&pdev->dev, "Failed to set dma max seg size\n"); | 3674 | d40_err(&pdev->dev, "Failed to set dma max seg size\n"); |
3675 | goto failure; | 3675 | goto failure; |
3676 | } | 3676 | } |
@@ -3678,8 +3678,8 @@ static int __init d40_probe(struct platform_device *pdev) | |||
3678 | d40_hw_init(base); | 3678 | d40_hw_init(base); |
3679 | 3679 | ||
3680 | if (np) { | 3680 | if (np) { |
3681 | err = of_dma_controller_register(np, d40_xlate, NULL); | 3681 | ret = of_dma_controller_register(np, d40_xlate, NULL); |
3682 | if (err && err != -ENODEV) | 3682 | if (ret) |
3683 | dev_err(&pdev->dev, | 3683 | dev_err(&pdev->dev, |
3684 | "could not register of_dma_controller\n"); | 3684 | "could not register of_dma_controller\n"); |
3685 | } | 3685 | } |