diff mbox series

[v4,07/15] iio: adc: ad7091r: Remove unneeded probe parameters

Message ID fce36ae9ee134f124d78beab53e79bb5d70fe68b.1702746240.git.marcelo.schmitt1@gmail.com
State Superseded
Headers show
Series Add support for AD7091R-2/-4/-8 | expand

Commit Message

Marcelo Schmitt Dec. 16, 2023, 5:48 p.m. UTC
With the grouping of ad7091r initialization data and callbacks into the
init_info struct, there is no more need to pass the device name and
register map through probe function parameters as those will be available
in the init_info object.
Remove probe parameters that are not needed anymore.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
---
Maybe squash this patch with the previous one.
Wasn't sure about it and squashing is easier than to split so I left it separate.

 drivers/iio/adc/ad7091r-base.c | 8 ++++----
 drivers/iio/adc/ad7091r-base.h | 5 ++---
 drivers/iio/adc/ad7091r5.c     | 3 +--
 3 files changed, 7 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/drivers/iio/adc/ad7091r-base.c b/drivers/iio/adc/ad7091r-base.c
index ad4b4d591e1a..ed98729baf43 100644
--- a/drivers/iio/adc/ad7091r-base.c
+++ b/drivers/iio/adc/ad7091r-base.c
@@ -206,9 +206,8 @@  static void ad7091r_remove(void *data)
 	regulator_disable(st->vref);
 }
 
-int ad7091r_probe(struct device *dev, const char *name,
-		const struct ad7091r_init_info *init_info,
-		struct regmap *map, int irq)
+int ad7091r_probe(struct device *dev, const struct ad7091r_init_info *init_info,
+		  int irq)
 {
 	struct iio_dev *iio_dev;
 	struct ad7091r_state *st;
@@ -238,7 +237,8 @@  int ad7091r_probe(struct device *dev, const char *name,
 		ret = devm_request_threaded_irq(dev, irq, NULL,
 						ad7091r_event_handler,
 						IRQF_TRIGGER_FALLING |
-						IRQF_ONESHOT, name, iio_dev);
+						IRQF_ONESHOT,
+						st->chip_info->name, iio_dev);
 		if (ret)
 			return ret;
 	} else {
diff --git a/drivers/iio/adc/ad7091r-base.h b/drivers/iio/adc/ad7091r-base.h
index 51649570bb5d..3b3c81904ac2 100644
--- a/drivers/iio/adc/ad7091r-base.h
+++ b/drivers/iio/adc/ad7091r-base.h
@@ -65,9 +65,8 @@  struct ad7091r_init_info {
 
 extern const struct iio_event_spec ad7091r_events[3];
 
-int ad7091r_probe(struct device *dev, const char *name,
-		const struct ad7091r_init_info *init_info,
-		struct regmap *map, int irq);
+int ad7091r_probe(struct device *dev, const struct ad7091r_init_info *init_info,
+		  int irq);
 
 bool ad7091r_volatile_reg(struct device *dev, unsigned int reg);
 bool ad7091r_writeable_reg(struct device *dev, unsigned int reg);
diff --git a/drivers/iio/adc/ad7091r5.c b/drivers/iio/adc/ad7091r5.c
index 69b436920e2d..2872b6a0bae7 100644
--- a/drivers/iio/adc/ad7091r5.c
+++ b/drivers/iio/adc/ad7091r5.c
@@ -64,14 +64,13 @@  static struct ad7091r_init_info ad7091r5_init_info = {
 
 static int ad7091r5_i2c_probe(struct i2c_client *i2c)
 {
-	const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
 	const struct ad7091r_init_info *init_info;
 
 	init_info = i2c_get_match_data(i2c);
 	if (!init_info)
 		return -EINVAL;
 
-	return ad7091r_probe(&i2c->dev, id->name, init_info, NULL, i2c->irq);
+	return ad7091r_probe(&i2c->dev, init_info, i2c->irq);
 }
 
 static const struct of_device_id ad7091r5_dt_ids[] = {