2022-11-18 23:23:58

by Crt Mori

[permalink] [raw]
Subject: Re: [PATCH 186/606] iio: temperature: mlx90632: Convert to i2c's .probe_new()

On Fri, 18 Nov 2022 at 23:46, Uwe Kleine-König <[email protected]> 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/iio/temperature/mlx90632.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> index f1f5ebc145b1..19e30cfca8a7 100644
> --- a/drivers/iio/temperature/mlx90632.c
> +++ b/drivers/iio/temperature/mlx90632.c
> @@ -1168,9 +1168,9 @@ static int mlx90632_enable_regulator(struct mlx90632_data *data)
> return ret;
> }
>
> -static int mlx90632_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int mlx90632_probe(struct i2c_client *client)
> {
> + const struct i2c_device_id *id = i2c_client_get_device_id(client);
> struct mlx90632_data *mlx90632;
> struct iio_dev *indio_dev;
> struct regmap *regmap;
> @@ -1337,7 +1337,15 @@ static struct i2c_driver mlx90632_driver = {
> .of_match_table = mlx90632_of_match,
> .pm = pm_ptr(&mlx90632_pm_ops),
> },
> +<<<<<<< ours

Maybe some of the merge artifacts left (also below)?

> .probe = mlx90632_probe,
> +||||||| base
> + .probe = mlx90632_probe,
> + .remove = mlx90632_remove,
> +=======
> + .probe_new = mlx90632_probe,
> + .remove = mlx90632_remove,
> +>>>>>>> theirs
> .id_table = mlx90632_id,
> };
> module_i2c_driver(mlx90632_driver);
> --
> 2.38.1
>


2022-11-19 10:41:19

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 186/606] iio: temperature: mlx90632: Convert to i2c's .probe_new()

Hello,

On Sat, Nov 19, 2022 at 12:04:41AM +0100, Crt Mori wrote:
> On Fri, 18 Nov 2022 at 23:46, Uwe Kleine-K?nig <[email protected]> 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/iio/temperature/mlx90632.c | 12 ++++++++++--
> > 1 file changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> > index f1f5ebc145b1..19e30cfca8a7 100644
> > --- a/drivers/iio/temperature/mlx90632.c
> > +++ b/drivers/iio/temperature/mlx90632.c
> > @@ -1168,9 +1168,9 @@ static int mlx90632_enable_regulator(struct mlx90632_data *data)
> > return ret;
> > }
> >
> > -static int mlx90632_probe(struct i2c_client *client,
> > - const struct i2c_device_id *id)
> > +static int mlx90632_probe(struct i2c_client *client)
> > {
> > + const struct i2c_device_id *id = i2c_client_get_device_id(client);
> > struct mlx90632_data *mlx90632;
> > struct iio_dev *indio_dev;
> > struct regmap *regmap;
> > @@ -1337,7 +1337,15 @@ static struct i2c_driver mlx90632_driver = {
> > .of_match_table = mlx90632_of_match,
> > .pm = pm_ptr(&mlx90632_pm_ops),
> > },
> > +<<<<<<< ours
>
> Maybe some of the merge artifacts left (also below)?

*groan*, ok, thanks for pointing out the obvious. Fixed in my tree. Ftr,
the fixup is:

diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
index 19e30cfca8a7..753b7a4ccfdd 100644
--- a/drivers/iio/temperature/mlx90632.c
+++ b/drivers/iio/temperature/mlx90632.c
@@ -1337,15 +1337,7 @@ static struct i2c_driver mlx90632_driver = {
.of_match_table = mlx90632_of_match,
.pm = pm_ptr(&mlx90632_pm_ops),
},
-<<<<<<< ours
- .probe = mlx90632_probe,
-||||||| base
- .probe = mlx90632_probe,
- .remove = mlx90632_remove,
-=======
.probe_new = mlx90632_probe,
- .remove = mlx90632_remove,
->>>>>>> theirs
.id_table = mlx90632_id,
};
module_i2c_driver(mlx90632_driver);

When (and if) I'll resend the series, the fixed version will be
included. (Unless someone picks up the broken patch with the above
fixup of course :-)

Best regards
Uwe

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


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

2022-11-20 10:13:46

by Crt Mori

[permalink] [raw]
Subject: Re: [PATCH 186/606] iio: temperature: mlx90632: Convert to i2c's .probe_new()

Ok. Acked-by: Crt Mori <[email protected]>
(resending since previous mail was not delivered because it was not plaintext)

On Sat, 19 Nov 2022 at 11:02, Uwe Kleine-König
<[email protected]> wrote:
>
> Hello,
>
> On Sat, Nov 19, 2022 at 12:04:41AM +0100, Crt Mori wrote:
> > On Fri, 18 Nov 2022 at 23:46, Uwe Kleine-König <[email protected]> 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/iio/temperature/mlx90632.c | 12 ++++++++++--
> > > 1 file changed, 10 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> > > index f1f5ebc145b1..19e30cfca8a7 100644
> > > --- a/drivers/iio/temperature/mlx90632.c
> > > +++ b/drivers/iio/temperature/mlx90632.c
> > > @@ -1168,9 +1168,9 @@ static int mlx90632_enable_regulator(struct mlx90632_data *data)
> > > return ret;
> > > }
> > >
> > > -static int mlx90632_probe(struct i2c_client *client,
> > > - const struct i2c_device_id *id)
> > > +static int mlx90632_probe(struct i2c_client *client)
> > > {
> > > + const struct i2c_device_id *id = i2c_client_get_device_id(client);
> > > struct mlx90632_data *mlx90632;
> > > struct iio_dev *indio_dev;
> > > struct regmap *regmap;
> > > @@ -1337,7 +1337,15 @@ static struct i2c_driver mlx90632_driver = {
> > > .of_match_table = mlx90632_of_match,
> > > .pm = pm_ptr(&mlx90632_pm_ops),
> > > },
> > > +<<<<<<< ours
> >
> > Maybe some of the merge artifacts left (also below)?
>
> *groan*, ok, thanks for pointing out the obvious. Fixed in my tree. Ftr,
> the fixup is:
>
> diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> index 19e30cfca8a7..753b7a4ccfdd 100644
> --- a/drivers/iio/temperature/mlx90632.c
> +++ b/drivers/iio/temperature/mlx90632.c
> @@ -1337,15 +1337,7 @@ static struct i2c_driver mlx90632_driver = {
> .of_match_table = mlx90632_of_match,
> .pm = pm_ptr(&mlx90632_pm_ops),
> },
> -<<<<<<< ours
> - .probe = mlx90632_probe,
> -||||||| base
> - .probe = mlx90632_probe,
> - .remove = mlx90632_remove,
> -=======
> .probe_new = mlx90632_probe,
> - .remove = mlx90632_remove,
> ->>>>>>> theirs
> .id_table = mlx90632_id,
> };
> module_i2c_driver(mlx90632_driver);
>
> When (and if) I'll resend the series, the fixed version will be
> included. (Unless someone picks up the broken patch with the above
> fixup of course :-)
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | https://www.pengutronix.de/ |

2022-11-22 18:57:43

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 186/606] iio: temperature: mlx90632: Convert to i2c's .probe_new()

On Sun, 20 Nov 2022 10:49:20 +0100
Crt Mori <[email protected]> wrote:

> Ok. Acked-by: Crt Mori <[email protected]>
> (resending since previous mail was not delivered because it was not plaintext)
>
> On Sat, 19 Nov 2022 at 11:02, Uwe Kleine-König
> <[email protected]> wrote:
> >
> > Hello,
> >
> > On Sat, Nov 19, 2022 at 12:04:41AM +0100, Crt Mori wrote:
> > > On Fri, 18 Nov 2022 at 23:46, Uwe Kleine-König <[email protected]> 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/iio/temperature/mlx90632.c | 12 ++++++++++--
> > > > 1 file changed, 10 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> > > > index f1f5ebc145b1..19e30cfca8a7 100644
> > > > --- a/drivers/iio/temperature/mlx90632.c
> > > > +++ b/drivers/iio/temperature/mlx90632.c
> > > > @@ -1168,9 +1168,9 @@ static int mlx90632_enable_regulator(struct mlx90632_data *data)
> > > > return ret;
> > > > }
> > > >
> > > > -static int mlx90632_probe(struct i2c_client *client,
> > > > - const struct i2c_device_id *id)
> > > > +static int mlx90632_probe(struct i2c_client *client)
> > > > {
> > > > + const struct i2c_device_id *id = i2c_client_get_device_id(client);
> > > > struct mlx90632_data *mlx90632;
> > > > struct iio_dev *indio_dev;
> > > > struct regmap *regmap;
> > > > @@ -1337,7 +1337,15 @@ static struct i2c_driver mlx90632_driver = {
> > > > .of_match_table = mlx90632_of_match,
> > > > .pm = pm_ptr(&mlx90632_pm_ops),
> > > > },
> > > > +<<<<<<< ours
> > >
> > > Maybe some of the merge artifacts left (also below)?
> >
> > *groan*, ok, thanks for pointing out the obvious. Fixed in my tree. Ftr,
> > the fixup is:
> >
> > diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> > index 19e30cfca8a7..753b7a4ccfdd 100644
> > --- a/drivers/iio/temperature/mlx90632.c
> > +++ b/drivers/iio/temperature/mlx90632.c
> > @@ -1337,15 +1337,7 @@ static struct i2c_driver mlx90632_driver = {
> > .of_match_table = mlx90632_of_match,
> > .pm = pm_ptr(&mlx90632_pm_ops),
> > },
> > -<<<<<<< ours
> > - .probe = mlx90632_probe,
> > -||||||| base
> > - .probe = mlx90632_probe,
> > - .remove = mlx90632_remove,
> > -=======
> > .probe_new = mlx90632_probe,
> > - .remove = mlx90632_remove,
> > ->>>>>>> theirs
> > .id_table = mlx90632_id,
> > };
> > module_i2c_driver(mlx90632_driver);
> >
> > When (and if) I'll resend the series, the fixed version will be
> > included. (Unless someone picks up the broken patch with the above
> > fixup of course :-)
Who would be crazy enough to do that?

(fixed up whilst applying)

Jonathan

> >
> > Best regards
> > Uwe
> >
> > --
> > Pengutronix e.K. | Uwe Kleine-König |
> > Industrial Linux Solutions | https://www.pengutronix.de/ |

2022-11-22 21:28:38

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 186/606] iio: temperature: mlx90632: Convert to i2c's .probe_new()

On Tue, Nov 22, 2022 at 06:35:57PM +0000, Jonathan Cameron wrote:
> On Sun, 20 Nov 2022 10:49:20 +0100
> Crt Mori <[email protected]> wrote:
>
> > Ok. Acked-by: Crt Mori <[email protected]>
> > (resending since previous mail was not delivered because it was not plaintext)
> >
> > On Sat, 19 Nov 2022 at 11:02, Uwe Kleine-K?nig
> > <[email protected]> wrote:
> > >
> > > Hello,
> > >
> > > On Sat, Nov 19, 2022 at 12:04:41AM +0100, Crt Mori wrote:
> > > > On Fri, 18 Nov 2022 at 23:46, Uwe Kleine-K?nig <[email protected]> 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/iio/temperature/mlx90632.c | 12 ++++++++++--
> > > > > 1 file changed, 10 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> > > > > index f1f5ebc145b1..19e30cfca8a7 100644
> > > > > --- a/drivers/iio/temperature/mlx90632.c
> > > > > +++ b/drivers/iio/temperature/mlx90632.c
> > > > > @@ -1168,9 +1168,9 @@ static int mlx90632_enable_regulator(struct mlx90632_data *data)
> > > > > return ret;
> > > > > }
> > > > >
> > > > > -static int mlx90632_probe(struct i2c_client *client,
> > > > > - const struct i2c_device_id *id)
> > > > > +static int mlx90632_probe(struct i2c_client *client)
> > > > > {
> > > > > + const struct i2c_device_id *id = i2c_client_get_device_id(client);
> > > > > struct mlx90632_data *mlx90632;
> > > > > struct iio_dev *indio_dev;
> > > > > struct regmap *regmap;
> > > > > @@ -1337,7 +1337,15 @@ static struct i2c_driver mlx90632_driver = {
> > > > > .of_match_table = mlx90632_of_match,
> > > > > .pm = pm_ptr(&mlx90632_pm_ops),
> > > > > },
> > > > > +<<<<<<< ours
> > > >
> > > > Maybe some of the merge artifacts left (also below)?
> > >
> > > *groan*, ok, thanks for pointing out the obvious. Fixed in my tree. Ftr,
> > > the fixup is:
> > >
> > > diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> > > index 19e30cfca8a7..753b7a4ccfdd 100644
> > > --- a/drivers/iio/temperature/mlx90632.c
> > > +++ b/drivers/iio/temperature/mlx90632.c
> > > @@ -1337,15 +1337,7 @@ static struct i2c_driver mlx90632_driver = {
> > > .of_match_table = mlx90632_of_match,
> > > .pm = pm_ptr(&mlx90632_pm_ops),
> > > },
> > > -<<<<<<< ours
> > > - .probe = mlx90632_probe,
> > > -||||||| base
> > > - .probe = mlx90632_probe,
> > > - .remove = mlx90632_remove,
> > > -=======
> > > .probe_new = mlx90632_probe,
> > > - .remove = mlx90632_remove,
> > > ->>>>>>> theirs
> > > .id_table = mlx90632_id,
> > > };
> > > module_i2c_driver(mlx90632_driver);
> > >
> > > When (and if) I'll resend the series, the fixed version will be
> > > included. (Unless someone picks up the broken patch with the above
> > > fixup of course :-)
> Who would be crazy enough to do that?
>
> (fixed up whilst applying)

Thanks, people seem really eager to prevent me resending the series :-)

Best regards
Uwe

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


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