aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2020-04-29 15:58:19 -0500
committerRob Herring <[email protected]>2020-05-13 12:42:45 -0500
commit0ea355ef78434ae3e8faffe605c98b62e07d1273 (patch)
tree61fec1332ab7b68801cffc46e66efff8ae9d6da6
parent13fc767335caf08eed4de5a07e509cfddf6d2cbd (diff)
mfd: vexpress-sysreg: Use devres API variants
Use the managed devm_gpiochip_add_data() and devm_mfd_add_devices() instead of their unmanaged counterparts. With this, no .remove() hook is needed for driver unbind. Cc: Lorenzo Pieralisi <[email protected]> Cc: Linus Walleij <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Liviu Dudau <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Rob Herring <[email protected]>
-rw-r--r--drivers/mfd/vexpress-sysreg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c
index 90a4eda2ba2b..9fb37fa689e0 100644
--- a/drivers/mfd/vexpress-sysreg.c
+++ b/drivers/mfd/vexpress-sysreg.c
@@ -140,9 +140,9 @@ static int vexpress_sysreg_probe(struct platform_device *pdev)
bgpio_init(mmc_gpio_chip, &pdev->dev, 0x4, base + SYS_MCI,
NULL, NULL, NULL, NULL, 0);
mmc_gpio_chip->ngpio = 2;
- gpiochip_add_data(mmc_gpio_chip, NULL);
+ devm_gpiochip_add_data(&pdev->dev, mmc_gpio_chip, NULL);
- return mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
+ return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
vexpress_sysreg_cells,
ARRAY_SIZE(vexpress_sysreg_cells), mem, 0, NULL);
}