Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
[firefly-linux-kernel-4.4.55.git] / drivers / dma / mmp_pdma.c
index 41ad6a62f8383a72ca35f7a2380b7f4aca529677..c26699f9c4dfdbcec1c3f0d6ee0cf3d173227294 100644 (file)
@@ -5,6 +5,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/err.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -710,7 +711,7 @@ static void dma_do_tasklet(unsigned long data)
        }
 }
 
-static int __devexit mmp_pdma_remove(struct platform_device *op)
+static int mmp_pdma_remove(struct platform_device *op)
 {
        struct mmp_pdma_device *pdev = platform_get_drvdata(op);
 
@@ -780,9 +781,9 @@ static int mmp_pdma_probe(struct platform_device *op)
        if (!iores)
                return -EINVAL;
 
-       pdev->base = devm_request_and_ioremap(pdev->dev, iores);
-       if (!pdev->base)
-               return -EADDRNOTAVAIL;
+       pdev->base = devm_ioremap_resource(pdev->dev, iores);
+       if (IS_ERR(pdev->base))
+               return PTR_ERR(pdev->base);
 
        of_id = of_match_device(mmp_pdma_dt_ids, pdev->dev);
        if (of_id)