mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
pinctrl/rockchip: Make use of the devm_platform_get_and_ioremap_resource()
Use the devm_platform_get_and_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
This commit is contained in:
parent
e4dd7fd5ff
commit
fb17dcd73f
1 changed files with 2 additions and 4 deletions
|
@ -2697,8 +2697,7 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
|
|||
if (IS_ERR(info->regmap_base))
|
||||
return PTR_ERR(info->regmap_base);
|
||||
} else {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
|
@ -2712,8 +2711,7 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
|
|||
|
||||
/* Honor the old binding, with pull registers as 2nd resource */
|
||||
if (ctrl->type == RK3188 && info->reg_size < 0x200) {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
base = devm_platform_get_and_ioremap_resource(pdev, 1, &res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
|
|
Loading…
Reference in a new issue