From: Marcelo Schmitt <marcelo.schmitt@analog.com>
To: <apw@canonical.com>, <joe@perches.com>, <dwaipayanray1@gmail.com>,
<lukas.bulwahn@gmail.com>, <paul.cercueil@analog.com>,
<Michael.Hennerich@analog.com>, <lars@metafoo.de>,
<jic23@kernel.org>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
<dan.carpenter@linaro.org>, <dlechner@baylibre.com>,
<marcelo.schmitt1@gmail.com>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v4 07/15] iio: adc: ad7091r: Remove unneeded probe parameters
Date: Sat, 16 Dec 2023 14:48:16 -0300 [thread overview]
Message-ID: <fce36ae9ee134f124d78beab53e79bb5d70fe68b.1702746240.git.marcelo.schmitt1@gmail.com> (raw)
In-Reply-To: <cover.1702746240.git.marcelo.schmitt1@gmail.com>
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 --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[] = {
--
2.42.0
next prev parent reply other threads:[~2023-12-16 17:48 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-16 17:44 [PATCH v4 00/15] Add support for AD7091R-2/-4/-8 Marcelo Schmitt
2023-12-16 17:45 ` [PATCH v4 01/15] scripts: checkpatch: Add __aligned to the list of attribute notes Marcelo Schmitt
2023-12-16 18:07 ` Joe Perches
2023-12-17 14:51 ` Jonathan Cameron
2023-12-16 17:46 ` [PATCH v4 02/15] iio: adc: ad7091r: Pass iio_dev to event handler Marcelo Schmitt
2023-12-17 14:53 ` Jonathan Cameron
2023-12-16 17:46 ` [PATCH v4 03/15] iio: adc: ad7091r: Set alert bit in config register Marcelo Schmitt
2023-12-17 14:55 ` Jonathan Cameron
2023-12-18 17:22 ` Marcelo Schmitt
2023-12-16 17:47 ` [PATCH v4 04/15] iio: adc: ad7091r: Align arguments to function call parenthesis Marcelo Schmitt
2023-12-17 14:57 ` Jonathan Cameron
2023-12-16 17:47 ` [PATCH v4 05/15] iio: adc: ad7091r: Move generic AD7091R code to base driver and header file Marcelo Schmitt
2023-12-17 14:59 ` Jonathan Cameron
2023-12-16 17:47 ` [PATCH v4 06/15] iio: adc: ad7091r: Move chip init data to container struct Marcelo Schmitt
2023-12-17 13:04 ` [PATCH v4 6/15] " kernel test robot
2023-12-17 14:48 ` Jonathan Cameron
2023-12-16 17:48 ` Marcelo Schmitt [this message]
2023-12-16 17:48 ` [PATCH v4 08/15] iio: adc: ad7091r: Set device mode through chip_info callback Marcelo Schmitt
2023-12-16 17:49 ` [PATCH v4 09/15] iio: adc: ad7091r: Enable internal vref if external vref is not supplied Marcelo Schmitt
2023-12-17 15:41 ` Jonathan Cameron
2023-12-18 17:35 ` Marcelo Schmitt
2023-12-20 14:04 ` Jonathan Cameron
2023-12-18 0:36 ` David Lechner
2023-12-18 17:42 ` Marcelo Schmitt
2023-12-16 17:49 ` [PATCH v4 10/15] iio: adc: ad7091r: Add chip_info callback to get conversion result channel Marcelo Schmitt
2023-12-16 17:49 ` [PATCH v4 11/15] iio: adc: Split AD7091R-5 config symbol Marcelo Schmitt
2023-12-16 17:50 ` [PATCH v4 12/15] dt-bindings: iio: Add AD7091R-8 Marcelo Schmitt
2023-12-16 23:55 ` Conor Dooley
2023-12-16 17:50 ` [PATCH v4 13/15] iio: adc: Add support for AD7091R-8 Marcelo Schmitt
2023-12-17 15:46 ` Jonathan Cameron
2023-12-16 17:51 ` [PATCH v4 14/15] MAINTAINERS: Add MAINTAINERS entry for AD7091R Marcelo Schmitt
2023-12-16 17:51 ` [PATCH v4 15/15] iio: adc: ad7091r: Allow users to configure device events Marcelo Schmitt
2023-12-17 15:54 ` Jonathan Cameron
2023-12-17 23:58 ` David Lechner
2023-12-18 0:10 ` David Lechner
2023-12-18 0:30 ` David Lechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fce36ae9ee134f124d78beab53e79bb5d70fe68b.1702746240.git.marcelo.schmitt1@gmail.com \
--to=marcelo.schmitt@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=apw@canonical.com \
--cc=conor+dt@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=dwaipayanray1@gmail.com \
--cc=jic23@kernel.org \
--cc=joe@perches.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=marcelo.schmitt1@gmail.com \
--cc=paul.cercueil@analog.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox