diff options
| -rw-r--r-- | drivers/dma/ste_dma40.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index f4edfc56f34e..5e328bd10c27 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
| @@ -2839,7 +2839,7 @@ static int __init d40_dmaengine_init(struct d40_base *base, | |||
| 2839 | 2839 | ||
| 2840 | d40_ops_init(base, &base->dma_slave); | 2840 | d40_ops_init(base, &base->dma_slave); |
| 2841 | 2841 | ||
| 2842 | err = dma_async_device_register(&base->dma_slave); | 2842 | err = dmaenginem_async_device_register(&base->dma_slave); |
| 2843 | 2843 | ||
| 2844 | if (err) { | 2844 | if (err) { |
| 2845 | d40_err(base->dev, "Failed to register slave channels\n"); | 2845 | d40_err(base->dev, "Failed to register slave channels\n"); |
| @@ -2854,12 +2854,12 @@ static int __init d40_dmaengine_init(struct d40_base *base, | |||
| 2854 | 2854 | ||
| 2855 | d40_ops_init(base, &base->dma_memcpy); | 2855 | d40_ops_init(base, &base->dma_memcpy); |
| 2856 | 2856 | ||
| 2857 | err = dma_async_device_register(&base->dma_memcpy); | 2857 | err = dmaenginem_async_device_register(&base->dma_memcpy); |
| 2858 | 2858 | ||
| 2859 | if (err) { | 2859 | if (err) { |
| 2860 | d40_err(base->dev, | 2860 | d40_err(base->dev, |
| 2861 | "Failed to register memcpy only channels\n"); | 2861 | "Failed to register memcpy only channels\n"); |
| 2862 | goto unregister_slave; | 2862 | goto exit; |
| 2863 | } | 2863 | } |
| 2864 | 2864 | ||
| 2865 | d40_chan_init(base, &base->dma_both, base->phy_chans, | 2865 | d40_chan_init(base, &base->dma_both, base->phy_chans, |
| @@ -2871,18 +2871,14 @@ static int __init d40_dmaengine_init(struct d40_base *base, | |||
| 2871 | dma_cap_set(DMA_CYCLIC, base->dma_slave.cap_mask); | 2871 | dma_cap_set(DMA_CYCLIC, base->dma_slave.cap_mask); |
| 2872 | 2872 | ||
| 2873 | d40_ops_init(base, &base->dma_both); | 2873 | d40_ops_init(base, &base->dma_both); |
| 2874 | err = dma_async_device_register(&base->dma_both); | 2874 | err = dmaenginem_async_device_register(&base->dma_both); |
| 2875 | 2875 | ||
| 2876 | if (err) { | 2876 | if (err) { |
| 2877 | d40_err(base->dev, | 2877 | d40_err(base->dev, |
| 2878 | "Failed to register logical and physical capable channels\n"); | 2878 | "Failed to register logical and physical capable channels\n"); |
| 2879 | goto unregister_memcpy; | 2879 | goto exit; |
| 2880 | } | 2880 | } |
| 2881 | return 0; | 2881 | return 0; |
| 2882 | unregister_memcpy: | ||
| 2883 | dma_async_device_unregister(&base->dma_memcpy); | ||
| 2884 | unregister_slave: | ||
| 2885 | dma_async_device_unregister(&base->dma_slave); | ||
| 2886 | exit: | 2882 | exit: |
| 2887 | return err; | 2883 | return err; |
| 2888 | } | 2884 | } |
