Message ID | 20230412064635.41315-2-yang.lee@linux.alibaba.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [-next,1/3] drm/mediatek: Use devm_platform_ioremap_resource() | expand |
On 12/04/2023 08:46, Yang Li wrote: > Remove variable 'res' and convert platform_get_resource(), > devm_ioremap_resource() to a single call to > devm_platform_ioremap_resource(), as this is exactly what this function > does. > > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> > --- > drivers/gpu/drm/mediatek/mtk_disp_aal.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_aal.c b/drivers/gpu/drm/mediatek/mtk_disp_aal.c > index 434e8a9ce8ab..391fa0ece22c 100644 > --- a/drivers/gpu/drm/mediatek/mtk_disp_aal.c > +++ b/drivers/gpu/drm/mediatek/mtk_disp_aal.c > @@ -104,7 +104,6 @@ static int mtk_disp_aal_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct mtk_disp_aal *priv; > - struct resource *res; > int ret; > > priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); > @@ -117,8 +116,7 @@ static int mtk_disp_aal_probe(struct platform_device *pdev) > return PTR_ERR(priv->clk); > } > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - priv->regs = devm_ioremap_resource(dev, res); > + priv->regs = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(priv->regs)) { > dev_err(dev, "failed to ioremap aal\n"); > return PTR_ERR(priv->regs);
On 12/04/2023 08:46, Yang Li wrote: > Remove variable 'res' and convert platform_get_resource(), > devm_ioremap_resource() to a single call to > devm_platform_ioremap_resource(), as this is exactly what this function > does. > > Signed-off-by: Yang Li<yang.lee@linux.alibaba.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_aal.c b/drivers/gpu/drm/mediatek/mtk_disp_aal.c index 434e8a9ce8ab..391fa0ece22c 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_aal.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_aal.c @@ -104,7 +104,6 @@ static int mtk_disp_aal_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_disp_aal *priv; - struct resource *res; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -117,8 +116,7 @@ static int mtk_disp_aal_probe(struct platform_device *pdev) return PTR_ERR(priv->clk); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(dev, res); + priv->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->regs)) { dev_err(dev, "failed to ioremap aal\n"); return PTR_ERR(priv->regs);
Remove variable 'res' and convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> --- drivers/gpu/drm/mediatek/mtk_disp_aal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)