Skip to content

Commit

Permalink
drm/panfrost: Make use of the helper function devm_platform_ioremap_r…
Browse files Browse the repository at this point in the history
…esource()

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210831075327.653-1-caihuoqing@baidu.com
  • Loading branch information
Cai Huoqing authored and Steven Price committed Sep 2, 2021
1 parent 771d205 commit 3605eac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/panfrost/panfrost_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3605eac

Please sign in to comment.