<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p></p>
<pre>Reviewed-by: Yannick Fertré <a class="moz-txt-link-rfc2396E" href="mailto:yannick.fertre@st.com"><yannick.fertre@st.com></a>
Tested-by: Yannick Fertré <a class="moz-txt-link-rfc2396E" href="mailto:yannick.fertre@st.com"><yannick.fertre@st.com></a>
</pre>
<p>Best regards</p>
<p>-- <br>
Yannick Fertré | TINA: 166 7152 | Tel: +33 244027152 | Mobile: +33 620600270<br>
Microcontrollers and Digital ICs Group | Microcontrolleurs Division</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 9/21/19 8:20 PM, Markus Elfring wrote:<br>
</div>
<blockquote type="cite" cite="mid:e0d7b7d7-3e89-8b3f-04ed-0b14806e66f7@web.de">
<pre class="moz-quote-pre" wrap="">From: Markus Elfring <a class="moz-txt-link-rfc2396E" href="mailto:elfring@users.sourceforge.net"><elfring@users.sourceforge.net></a>
Date: Sat, 21 Sep 2019 20:04:08 +0200
Simplify this function implementation by using a known wrapper function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <a class="moz-txt-link-rfc2396E" href="mailto:elfring@users.sourceforge.net"><elfring@users.sourceforge.net></a>
---
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
index 675442bfc1bd..6ada149af9ef 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
@@ -981,7 +981,6 @@ __dw_mipi_dsi_probe(struct platform_device *pdev,
struct device *dev = &pdev->dev;
struct reset_control *apb_rst;
struct dw_mipi_dsi *dsi;
- struct resource *res;
int ret;
dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL);
@@ -997,11 +996,7 @@ __dw_mipi_dsi_probe(struct platform_device *pdev,
}
if (!plat_data->base) {
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return ERR_PTR(-ENODEV);
-
- dsi->base = devm_ioremap_resource(dev, res);
+ dsi->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dsi->base))
return ERR_PTR(-ENODEV);
--
2.23.0
</pre>
</blockquote>
<div class="moz-signature"><br>
</div>
</body>
</html>