Commit 46872098 authored by Markus Elfring's avatar Markus Elfring Committed by Andrzej Hajda

drm/bridge/synopsys: dsi: Use devm_platform_ioremap_resource() in __dw_mipi_dsi_probe()

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarYannick Fertré <yannick.fertre@st.com>
Tested-by: default avatarYannick Fertré <yannick.fertre@st.com>
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e0d7b7d7-3e89-8b3f-04ed-0b14806e66f7@web.de
parent 141f6357
...@@ -982,7 +982,6 @@ __dw_mipi_dsi_probe(struct platform_device *pdev, ...@@ -982,7 +982,6 @@ __dw_mipi_dsi_probe(struct platform_device *pdev,
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct reset_control *apb_rst; struct reset_control *apb_rst;
struct dw_mipi_dsi *dsi; struct dw_mipi_dsi *dsi;
struct resource *res;
int ret; int ret;
dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL); dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL);
...@@ -998,11 +997,7 @@ __dw_mipi_dsi_probe(struct platform_device *pdev, ...@@ -998,11 +997,7 @@ __dw_mipi_dsi_probe(struct platform_device *pdev,
} }
if (!plat_data->base) { if (!plat_data->base) {
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); dsi->base = devm_platform_ioremap_resource(pdev, 0);
if (!res)
return ERR_PTR(-ENODEV);
dsi->base = devm_ioremap_resource(dev, res);
if (IS_ERR(dsi->base)) if (IS_ERR(dsi->base))
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
......
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