Commit acd62418 authored by chenqiwu's avatar chenqiwu Committed by Vinod Koul

dmaengine: ti: dma-crossbar: convert to devm_platform_ioremap_resource()

Use a new API devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarchenqiwu <chenqiwu@xiaomi.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/1580189746-2864-1-git-send-email-qiwuchen55@gmail.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 6ebb827f
...@@ -133,7 +133,6 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev) ...@@ -133,7 +133,6 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev)
const struct of_device_id *match; const struct of_device_id *match;
struct device_node *dma_node; struct device_node *dma_node;
struct ti_am335x_xbar_data *xbar; struct ti_am335x_xbar_data *xbar;
struct resource *res;
void __iomem *iomem; void __iomem *iomem;
int i, ret; int i, ret;
...@@ -173,8 +172,7 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev) ...@@ -173,8 +172,7 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev)
xbar->xbar_events = TI_AM335X_XBAR_LINES; xbar->xbar_events = TI_AM335X_XBAR_LINES;
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); iomem = devm_platform_ioremap_resource(pdev, 0);
iomem = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(iomem)) if (IS_ERR(iomem))
return PTR_ERR(iomem); return PTR_ERR(iomem);
...@@ -323,7 +321,6 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev) ...@@ -323,7 +321,6 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
struct device_node *dma_node; struct device_node *dma_node;
struct ti_dra7_xbar_data *xbar; struct ti_dra7_xbar_data *xbar;
struct property *prop; struct property *prop;
struct resource *res;
u32 safe_val; u32 safe_val;
int sz; int sz;
void __iomem *iomem; void __iomem *iomem;
...@@ -403,8 +400,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev) ...@@ -403,8 +400,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
kfree(rsv_events); kfree(rsv_events);
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); iomem = devm_platform_ioremap_resource(pdev, 0);
iomem = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(iomem)) if (IS_ERR(iomem))
return PTR_ERR(iomem); return PTR_ERR(iomem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment