mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
drm/mxsfb: move to devm_platform_ioremap_resource() usage
Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Marek Vasut <marex@denx.de> Cc: Stefan Agner <stefan@agner.ch> Reviewed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com> Link: https://patchwork.freedesktop.org/patch/640852/?series=144073&rev=5
This commit is contained in:
parent
9da894756e
commit
46babeac0e
|
|
@ -134,7 +134,6 @@ static int lcdif_load(struct drm_device *drm)
|
|||
{
|
||||
struct platform_device *pdev = to_platform_device(drm->dev);
|
||||
struct lcdif_drm_private *lcdif;
|
||||
struct resource *res;
|
||||
int ret;
|
||||
|
||||
lcdif = devm_kzalloc(&pdev->dev, sizeof(*lcdif), GFP_KERNEL);
|
||||
|
|
@ -144,8 +143,7 @@ static int lcdif_load(struct drm_device *drm)
|
|||
lcdif->drm = drm;
|
||||
drm->dev_private = lcdif;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
lcdif->base = devm_ioremap_resource(drm->dev, res);
|
||||
lcdif->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(lcdif->base))
|
||||
return PTR_ERR(lcdif->base);
|
||||
|
||||
|
|
|
|||
|
|
@ -215,7 +215,6 @@ static int mxsfb_load(struct drm_device *drm,
|
|||
{
|
||||
struct platform_device *pdev = to_platform_device(drm->dev);
|
||||
struct mxsfb_drm_private *mxsfb;
|
||||
struct resource *res;
|
||||
int ret;
|
||||
|
||||
mxsfb = devm_kzalloc(&pdev->dev, sizeof(*mxsfb), GFP_KERNEL);
|
||||
|
|
@ -226,8 +225,7 @@ static int mxsfb_load(struct drm_device *drm,
|
|||
drm->dev_private = mxsfb;
|
||||
mxsfb->devdata = devdata;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
mxsfb->base = devm_ioremap_resource(drm->dev, res);
|
||||
mxsfb->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(mxsfb->base))
|
||||
return PTR_ERR(mxsfb->base);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user