drivers/soc/microchip/mpfs-control-scb.c | 15 ++++----------- drivers/soc/microchip/mpfs-mss-top-sysreg.c | 12 ++++-------- 2 files changed, 8 insertions(+), 19 deletions(-)
From: Conor Dooley <conor.dooley@microchip.com>
I'm gonna squash this, since only the binding is a stable tag.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
CC: Claudiu Beznea <claudiu.beznea@tuxon.dev>
CC: Conor Dooley <conor@kernel.org>
CC: linux-kernel@vger.kernel.org
---
drivers/soc/microchip/mpfs-control-scb.c | 15 ++++-----------
drivers/soc/microchip/mpfs-mss-top-sysreg.c | 12 ++++--------
2 files changed, 8 insertions(+), 19 deletions(-)
diff --git a/drivers/soc/microchip/mpfs-control-scb.c b/drivers/soc/microchip/mpfs-control-scb.c
index d1a8e79c232e..f0b84b1f49cb 100644
--- a/drivers/soc/microchip/mpfs-control-scb.c
+++ b/drivers/soc/microchip/mpfs-control-scb.c
@@ -2,31 +2,24 @@
#include <linux/array_size.h>
#include <linux/of.h>
-#include <linux/of_address.h>
#include <linux/mfd/core.h>
#include <linux/mfd/syscon.h>
-#include <linux/of_platform.h>
#include <linux/platform_device.h>
static const struct mfd_cell mpfs_control_scb_devs[] = {
- { .name = "mpfs-tvs", },
+ MFD_CELL_NAME("mpfs-tvs"),
};
static int mpfs_control_scb_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- int ret;
- ret = mfd_add_devices(dev, PLATFORM_DEVID_NONE, mpfs_control_scb_devs,
- 1, NULL, 0, NULL);
- if (ret)
- return ret;
-
- return 0;
+ return mfd_add_devices(dev, PLATFORM_DEVID_NONE, mpfs_control_scb_devs,
+ ARRAY_SIZE(mpfs_control_scb_devs), NULL, 0, NULL);
}
static const struct of_device_id mpfs_control_scb_of_match[] = {
- {.compatible = "microchip,mpfs-control-scb", },
+ { .compatible = "microchip,mpfs-control-scb", },
{},
};
MODULE_DEVICE_TABLE(of, mpfs_control_scb_of_match);
diff --git a/drivers/soc/microchip/mpfs-mss-top-sysreg.c b/drivers/soc/microchip/mpfs-mss-top-sysreg.c
index 9b2e7b84cdba..b2244e44ff0f 100644
--- a/drivers/soc/microchip/mpfs-mss-top-sysreg.c
+++ b/drivers/soc/microchip/mpfs-mss-top-sysreg.c
@@ -2,14 +2,13 @@
#include <linux/array_size.h>
#include <linux/of.h>
-#include <linux/of_address.h>
#include <linux/mfd/core.h>
#include <linux/mfd/syscon.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
static const struct mfd_cell mpfs_mss_top_sysreg_devs[] = {
- { .name = "mpfs-reset", },
+ MFD_CELL_NAME("mpfs-reset"),
};
static int mpfs_mss_top_sysreg_probe(struct platform_device *pdev)
@@ -18,18 +17,15 @@ static int mpfs_mss_top_sysreg_probe(struct platform_device *pdev)
int ret;
ret = mfd_add_devices(dev, PLATFORM_DEVID_NONE, mpfs_mss_top_sysreg_devs,
- 1, NULL, 0, NULL);
+ ARRAY_SIZE(mpfs_mss_top_sysreg_devs) , NULL, 0, NULL);
if (ret)
return ret;
- if (devm_of_platform_populate(dev))
- dev_err(dev, "Error populating children\n");
-
- return 0;
+ return devm_of_platform_populate(dev);
}
static const struct of_device_id mpfs_mss_top_sysreg_of_match[] = {
- {.compatible = "microchip,mpfs-mss-top-sysreg", },
+ { .compatible = "microchip,mpfs-mss-top-sysreg", },
{},
};
MODULE_DEVICE_TABLE(of, mpfs_mss_top_sysreg_of_match);
--
2.51.0
© 2016 - 2026 Red Hat, Inc.