On 31/08/2021 08:53, Cai Huoqing wrote: > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > > Signed-off-by: Cai Huoqing <caihuoqing@xxxxxxxxx> Reviewed-by: Steven Price <steven.price@xxxxxxx> I'll push this to drm-misc-next. Thanks, Steve > --- > drivers/gpu/drm/panfrost/panfrost_device.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c > index bd9b7be63b0f..1c692428b0d4 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_device.c > +++ b/drivers/gpu/drm/panfrost/panfrost_device.c > @@ -198,7 +198,6 @@ static int panfrost_pm_domain_init(struct panfrost_device *pfdev) > int panfrost_device_init(struct panfrost_device *pfdev) > { > int err; > - struct resource *res; > > mutex_init(&pfdev->sched_lock); > INIT_LIST_HEAD(&pfdev->scheduled_jobs); > @@ -236,8 +235,7 @@ int panfrost_device_init(struct panfrost_device *pfdev) > if (err) > goto out_reset; > > - res = platform_get_resource(pfdev->pdev, IORESOURCE_MEM, 0); > - pfdev->iomem = devm_ioremap_resource(pfdev->dev, res); > + pfdev->iomem = devm_platform_ioremap_resource(pfdev->pdev, 0); > if (IS_ERR(pfdev->iomem)) { > err = PTR_ERR(pfdev->iomem); > goto out_pm_domain; >