summaryrefslogtreecommitdiff
path: root/drivers/hwspinlock
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2019-09-27 15:10:44 +0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2019-10-04 21:07:19 -0700
commit74cfa956cbead238cf6c5307be461a087c569c97 (patch)
tree894b0cf2edcd57a2e0f6ef9abf3dfa97b4497ec9 /drivers/hwspinlock
parentacc98c1f2a1b4503588d3b1eb35db9cb76abdd89 (diff)
downloadlwn-74cfa956cbead238cf6c5307be461a087c569c97.tar.gz
lwn-74cfa956cbead238cf6c5307be461a087c569c97.zip
hwspinlock: sprd: Change to use devm_platform_ioremap_resource()
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/hwspinlock')
-rw-r--r--drivers/hwspinlock/sprd_hwspinlock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c
index dc42bf51f3e6..7a8534f77737 100644
--- a/drivers/hwspinlock/sprd_hwspinlock.c
+++ b/drivers/hwspinlock/sprd_hwspinlock.c
@@ -83,7 +83,6 @@ static int sprd_hwspinlock_probe(struct platform_device *pdev)
{
struct sprd_hwspinlock_dev *sprd_hwlock;
struct hwspinlock *lock;
- struct resource *res;
int i, ret;
if (!pdev->dev.of_node)
@@ -96,8 +95,7 @@ static int sprd_hwspinlock_probe(struct platform_device *pdev)
if (!sprd_hwlock)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- sprd_hwlock->base = devm_ioremap_resource(&pdev->dev, res);
+ sprd_hwlock->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sprd_hwlock->base))
return PTR_ERR(sprd_hwlock->base);