summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-08-31 15:53:27 +0800
committerSteven Price <steven.price@arm.com>2021-09-02 10:13:47 +0100
commit3605eacc8ae055d699f7fa3adb9123c4c36ecd82 (patch)
tree2cbb8de832e673d48c2999eb4c809254e7e7b768 /drivers
parent771d2053d41ff4d7c8dded432182cd1807ddc204 (diff)
drm/panfrost: Make use of the helper function devm_platform_ioremap_resource()
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_device.c4
1 files changed, 1 insertions, 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 @@ err:
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;