mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: pfuze: remove unused driver_data
@ 2019-10-12 14:16 Ahmad Fatoum
  2019-10-12 14:16 ` [PATCH 2/2] regulator: pfuze: add device_id of pfuze3001 Ahmad Fatoum
  2019-10-14 12:47 ` [PATCH 1/2] regulator: pfuze: remove unused driver_data Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2019-10-12 14:16 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

We pass along driver_data that goes unused. Drop it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/regulator/pfuze.c | 26 ++++++--------------------
 1 file changed, 6 insertions(+), 20 deletions(-)

diff --git a/drivers/regulator/pfuze.c b/drivers/regulator/pfuze.c
index dc41e8f55b84..eeb787cdab1f 100644
--- a/drivers/regulator/pfuze.c
+++ b/drivers/regulator/pfuze.c
@@ -161,16 +161,11 @@ static const struct regmap_config pfuze_regmap_i2c_config = {
 
 static int __init pfuze_probe(struct device_d *dev)
 {
-	struct pfuze_devtype *devtype;
 	int ret;
 
 	if (pfuze_dev)
 		return -EBUSY;
 
-	ret = dev_get_drvdata(dev, (const void **)&devtype);
-	if (ret)
-		return ret;
-
 	pfuze_dev = xzalloc(sizeof(*pfuze_dev));
 	pfuze_dev->dev = dev;
 
@@ -192,26 +187,17 @@ static int __init pfuze_probe(struct device_d *dev)
 	return 0;
 }
 
-static struct pfuze_devtype pfuze100_devtype = {
-};
-
-static struct pfuze_devtype pfuze200_devtype = {
-};
-
-static struct pfuze_devtype pfuze3000_devtype = {
-};
-
 static struct platform_device_id pfuze_ids[] = {
-	{ .name = "pfuze100", .driver_data = (ulong)&pfuze100_devtype, },
-	{ .name = "pfuze200", .driver_data = (ulong)&pfuze200_devtype, },
-	{ .name = "pfuze3000", .driver_data = (ulong)&pfuze3000_devtype, },
+	{ .name = "pfuze100" },
+	{ .name = "pfuze200" },
+	{ .name = "pfuze3000" },
 	{ }
 };
 
 static __maybe_unused struct of_device_id pfuze_dt_ids[] = {
-	{ .compatible = "fsl,pfuze100", .data = &pfuze100_devtype, },
-	{ .compatible = "fsl,pfuze200", .data = &pfuze200_devtype, },
-	{ .compatible = "fsl,pfuze3000", .data = &pfuze3000_devtype, },
+	{ .compatible = "fsl,pfuze100" },
+	{ .compatible = "fsl,pfuze200" },
+	{ .compatible = "fsl,pfuze3000" },
 	{ }
 };
 
-- 
2.23.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] regulator: pfuze: add device_id of pfuze3001
  2019-10-12 14:16 [PATCH 1/2] regulator: pfuze: remove unused driver_data Ahmad Fatoum
@ 2019-10-12 14:16 ` Ahmad Fatoum
  2019-10-14 12:47 ` [PATCH 1/2] regulator: pfuze: remove unused driver_data Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2019-10-12 14:16 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

This enables easy access to the pfuze3001's registers via regmap.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/regulator/pfuze.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/pfuze.c b/drivers/regulator/pfuze.c
index eeb787cdab1f..1950ffb04c13 100644
--- a/drivers/regulator/pfuze.c
+++ b/drivers/regulator/pfuze.c
@@ -191,6 +191,7 @@ static struct platform_device_id pfuze_ids[] = {
 	{ .name = "pfuze100" },
 	{ .name = "pfuze200" },
 	{ .name = "pfuze3000" },
+	{ .name = "pfuze3001" },
 	{ }
 };
 
@@ -198,6 +199,7 @@ static __maybe_unused struct of_device_id pfuze_dt_ids[] = {
 	{ .compatible = "fsl,pfuze100" },
 	{ .compatible = "fsl,pfuze200" },
 	{ .compatible = "fsl,pfuze3000" },
+	{ .compatible = "fsl,pfuze3001" },
 	{ }
 };
 
-- 
2.23.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] regulator: pfuze: remove unused driver_data
  2019-10-12 14:16 [PATCH 1/2] regulator: pfuze: remove unused driver_data Ahmad Fatoum
  2019-10-12 14:16 ` [PATCH 2/2] regulator: pfuze: add device_id of pfuze3001 Ahmad Fatoum
@ 2019-10-14 12:47 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2019-10-14 12:47 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Sat, Oct 12, 2019 at 04:16:31PM +0200, Ahmad Fatoum wrote:
> We pass along driver_data that goes unused. Drop it.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  drivers/regulator/pfuze.c | 26 ++++++--------------------
>  1 file changed, 6 insertions(+), 20 deletions(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-14 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-12 14:16 [PATCH 1/2] regulator: pfuze: remove unused driver_data Ahmad Fatoum
2019-10-12 14:16 ` [PATCH 2/2] regulator: pfuze: add device_id of pfuze3001 Ahmad Fatoum
2019-10-14 12:47 ` [PATCH 1/2] regulator: pfuze: remove unused driver_data Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox