diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-06 13:39:33 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-08-18 22:48:00 +0200 |
commit | 8e950a60680f3695d98fed5f7add85f493a1420e (patch) | |
tree | 09b14d66d9f78904755c5596006edd5336a9166a /drivers/mfd | |
parent | mfd: rk808: Make MFD_RK8XX tristate (diff) | |
download | linux-8e950a60680f3695d98fed5f7add85f493a1420e.tar.xz linux-8e950a60680f3695d98fed5f7add85f493a1420e.zip |
mfd: atmel-hlcdc: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230706113939.1178-1-frank.li@vivo.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/atmel-hlcdc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c index 3c2414ba4b01..20de7f49a830 100644 --- a/drivers/mfd/atmel-hlcdc.c +++ b/drivers/mfd/atmel-hlcdc.c @@ -83,7 +83,6 @@ static int atmel_hlcdc_probe(struct platform_device *pdev) struct atmel_hlcdc_regmap *hregmap; struct device *dev = &pdev->dev; struct atmel_hlcdc *hlcdc; - struct resource *res; hregmap = devm_kzalloc(dev, sizeof(*hregmap), GFP_KERNEL); if (!hregmap) @@ -93,8 +92,7 @@ static int atmel_hlcdc_probe(struct platform_device *pdev) if (!hlcdc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hregmap->regs = devm_ioremap_resource(dev, res); + hregmap->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hregmap->regs)) return PTR_ERR(hregmap->regs); |