2022-11-19 01:08:22

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH 567/606] staging: iio: ad5933: Convert to i2c's .probe_new()

From: Uwe Kleine-König <[email protected]>

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/staging/iio/impedance-analyzer/ad5933.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index f177b20f0f2d..b3152f7153fb 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -674,9 +674,9 @@ static void ad5933_clk_disable(void *data)
clk_disable_unprepare(st->mclk);
}

-static int ad5933_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int ad5933_probe(struct i2c_client *client)
{
+ const struct i2c_device_id *id = i2c_client_get_device_id(client);
int ret;
struct ad5933_state *st;
struct iio_dev *indio_dev;
@@ -781,7 +781,7 @@ static struct i2c_driver ad5933_driver = {
.name = "ad5933",
.of_match_table = ad5933_of_match,
},
- .probe = ad5933_probe,
+ .probe_new = ad5933_probe,
.id_table = ad5933_id,
};
module_i2c_driver(ad5933_driver);
--
2.38.1



2022-11-22 12:45:18

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 567/606] staging: iio: ad5933: Convert to i2c's .probe_new()

On Fri, Nov 18, 2022 at 11:45:01PM +0100, Uwe Kleine-K?nig wrote:
> From: Uwe Kleine-K?nig <[email protected]>
>
> .probe_new() doesn't get the i2c_device_id * parameter, so determine
> that explicitly in the probe function.
>
> Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> ---
> drivers/staging/iio/impedance-analyzer/ad5933.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
> index f177b20f0f2d..b3152f7153fb 100644
> --- a/drivers/staging/iio/impedance-analyzer/ad5933.c
> +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
> @@ -674,9 +674,9 @@ static void ad5933_clk_disable(void *data)
> clk_disable_unprepare(st->mclk);
> }
>
> -static int ad5933_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int ad5933_probe(struct i2c_client *client)
> {
> + const struct i2c_device_id *id = i2c_client_get_device_id(client);

Breaks the build in my tree as this function is not in Linus's tree yet
:(

2022-11-22 14:50:33

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 567/606] staging: iio: ad5933: Convert to i2c's .probe_new()

Hello Greg,

On Tue, Nov 22, 2022 at 01:22:39PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Nov 18, 2022 at 11:45:01PM +0100, Uwe Kleine-K?nig wrote:
> > From: Uwe Kleine-K?nig <[email protected]>
> >
> > .probe_new() doesn't get the i2c_device_id * parameter, so determine
> > that explicitly in the probe function.
> >
> > Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> > ---
> > drivers/staging/iio/impedance-analyzer/ad5933.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
> > index f177b20f0f2d..b3152f7153fb 100644
> > --- a/drivers/staging/iio/impedance-analyzer/ad5933.c
> > +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
> > @@ -674,9 +674,9 @@ static void ad5933_clk_disable(void *data)
> > clk_disable_unprepare(st->mclk);
> > }
> >
> > -static int ad5933_probe(struct i2c_client *client,
> > - const struct i2c_device_id *id)
> > +static int ad5933_probe(struct i2c_client *client)
> > {
> > + const struct i2c_device_id *id = i2c_client_get_device_id(client);
>
> Breaks the build in my tree as this function is not in Linus's tree yet
> :(

As pointed out in the cover letter[1] you want to make sure that

https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/client_device_id_helper-immutable

is part of your tree first. So either pull that into your tree, or wait
until this hits Linus's tree.

Best regards
Uwe

[1] https://lore.kernel.org/linux-kernel/[email protected]
(It wasn't sent to every thread participant because that would have
been too many.)

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (1.87 kB)
signature.asc (499.00 B)
Download all attachments

2022-11-22 19:01:25

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 567/606] staging: iio: ad5933: Convert to i2c's .probe_new()

On Tue, 22 Nov 2022 14:35:34 +0100
Uwe Kleine-König <[email protected]> wrote:

> Hello Greg,
>
> On Tue, Nov 22, 2022 at 01:22:39PM +0100, Greg Kroah-Hartman wrote:
> > On Fri, Nov 18, 2022 at 11:45:01PM +0100, Uwe Kleine-König wrote:
> > > From: Uwe Kleine-König <[email protected]>
> > >
> > > .probe_new() doesn't get the i2c_device_id * parameter, so determine
> > > that explicitly in the probe function.
> > >
> > > Signed-off-by: Uwe Kleine-König <[email protected]>
> > > ---
> > > drivers/staging/iio/impedance-analyzer/ad5933.c | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
> > > index f177b20f0f2d..b3152f7153fb 100644
> > > --- a/drivers/staging/iio/impedance-analyzer/ad5933.c
> > > +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
> > > @@ -674,9 +674,9 @@ static void ad5933_clk_disable(void *data)
> > > clk_disable_unprepare(st->mclk);
> > > }
> > >
> > > -static int ad5933_probe(struct i2c_client *client,
> > > - const struct i2c_device_id *id)
> > > +static int ad5933_probe(struct i2c_client *client)
> > > {
> > > + const struct i2c_device_id *id = i2c_client_get_device_id(client);
> >
> > Breaks the build in my tree as this function is not in Linus's tree yet
> > :(
>
> As pointed out in the cover letter[1] you want to make sure that
>
> https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/client_device_id_helper-immutable
>
> is part of your tree first. So either pull that into your tree, or wait
> until this hits Linus's tree.

Greg,

I'm already carrying that tree so I'll pick these up unless you particularly want to take
the IIO staging ones with whatever else there is in staging from this series.

Jonathan

>
> Best regards
> Uwe
>
> [1] https://lore.kernel.org/linux-kernel/[email protected]
> (It wasn't sent to every thread participant because that would have
> been too many.)
>