[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <090a6b461410a374511a8c73659de28b2665f96b.1703013352.git.marcelo.schmitt1@gmail.com>
Date: Tue, 19 Dec 2023 17:28:05 -0300
From: Marcelo Schmitt <marcelo.schmitt@...log.com>
To: <apw@...onical.com>, <joe@...ches.com>, <dwaipayanray1@...il.com>,
<lukas.bulwahn@...il.com>, <paul.cercueil@...log.com>,
<Michael.Hennerich@...log.com>, <lars@...afoo.de>, <jic23@...nel.org>,
<robh+dt@...nel.org>, <krzysztof.kozlowski+dt@...aro.org>,
<conor+dt@...nel.org>, <dan.carpenter@...aro.org>,
<dlechner@...libre.com>, <marcelo.schmitt1@...il.com>
CC: <linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH v5 05/11] iio: adc: ad7091r: Remove unneeded probe parameters
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@...log.com>
---
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 --git a/drivers/iio/adc/ad7091r-base.c b/drivers/iio/adc/ad7091r-base.c
index b5f9423e4e6d..2c65c63db40c 100644
--- a/drivers/iio/adc/ad7091r-base.c
+++ b/drivers/iio/adc/ad7091r-base.c
@@ -341,9 +341,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;
@@ -373,7 +372,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 b3c43a200825..a57ec36491f5 100644
--- a/drivers/iio/adc/ad7091r-base.h
+++ b/drivers/iio/adc/ad7091r-base.h
@@ -70,9 +70,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 4b8f9ba078eb..cb4c7865f0cc 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[] = {
--
2.42.0
Powered by blists - more mailing lists