summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sprd
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2019-07-25 11:56:30 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-08-05 12:12:32 +0200
commite89febc75df909fadd43b76754778109a05383c0 (patch)
tree86ba63c6e7fc7f3b4e7145e1e436701acc3de5c3 /drivers/pinctrl/sprd
parentpinctrl: qdf2xxx: Switch to use device_property_count_uXX() (diff)
downloadlinux-e89febc75df909fadd43b76754778109a05383c0.tar.xz
linux-e89febc75df909fadd43b76754778109a05383c0.zip
pinctrl: sprd: Change to use devm_platform_ioremap_resource()
The devm_platform_ioremap_resource() function wraps platform_get_resource() and devm_ioremap_resource() in a single helper, thus use it to simplify the code. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Link: https://lore.kernel.org/r/ff410d312ed0047b5a36e5113daf7df78bcf1aa8.1564048446.git.baolin.wang@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sprd')
-rw-r--r--drivers/pinctrl/sprd/pinctrl-sprd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c b/drivers/pinctrl/sprd/pinctrl-sprd.c
index c31b58168772..a32e8098d887 100644
--- a/drivers/pinctrl/sprd/pinctrl-sprd.c
+++ b/drivers/pinctrl/sprd/pinctrl-sprd.c
@@ -1020,7 +1020,6 @@ int sprd_pinctrl_core_probe(struct platform_device *pdev,
struct sprd_pinctrl *sprd_pctl;
struct sprd_pinctrl_soc_info *pinctrl_info;
struct pinctrl_pin_desc *pin_desc;
- struct resource *res;
int ret, i;
sprd_pctl = devm_kzalloc(&pdev->dev, sizeof(struct sprd_pinctrl),
@@ -1028,8 +1027,7 @@ int sprd_pinctrl_core_probe(struct platform_device *pdev,
if (!sprd_pctl)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- sprd_pctl->base = devm_ioremap_resource(&pdev->dev, res);
+ sprd_pctl->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sprd_pctl->base))
return PTR_ERR(sprd_pctl->base);