2022-07-27 18:25:59

by Potin Lai

[permalink] [raw]
Subject: [PATCH v3 1/2] iio: humidity: hdc100x: switch to probe_new callback

Switch to probe_new callback due to probe is deprecated soon.

Signed-off-by: Potin Lai <[email protected]>
---
drivers/iio/humidity/hdc100x.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index 9e0fce917ce4c..0d514818635cb 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -351,8 +351,7 @@ static const struct iio_info hdc100x_info = {
.attrs = &hdc100x_attribute_group,
};

-static int hdc100x_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int hdc100x_probe(struct i2c_client *client)
{
struct iio_dev *indio_dev;
struct hdc100x_data *data;
@@ -422,7 +421,7 @@ static struct i2c_driver hdc100x_driver = {
.name = "hdc100x",
.of_match_table = hdc100x_dt_ids,
},
- .probe = hdc100x_probe,
+ .probe_new = hdc100x_probe,
.id_table = hdc100x_id,
};
module_i2c_driver(hdc100x_driver);
--
2.31.1


2022-07-27 18:32:54

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] iio: humidity: hdc100x: switch to probe_new callback

On Wed, Jul 27, 2022 at 6:43 PM Potin Lai <[email protected]> wrote:
>
> Switch to probe_new callback due to probe is deprecated soon.

Reviewed-by: Andy Shevchenko <[email protected]>

> Signed-off-by: Potin Lai <[email protected]>
> ---
> drivers/iio/humidity/hdc100x.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
> index 9e0fce917ce4c..0d514818635cb 100644
> --- a/drivers/iio/humidity/hdc100x.c
> +++ b/drivers/iio/humidity/hdc100x.c
> @@ -351,8 +351,7 @@ static const struct iio_info hdc100x_info = {
> .attrs = &hdc100x_attribute_group,
> };
>
> -static int hdc100x_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int hdc100x_probe(struct i2c_client *client)
> {
> struct iio_dev *indio_dev;
> struct hdc100x_data *data;
> @@ -422,7 +421,7 @@ static struct i2c_driver hdc100x_driver = {
> .name = "hdc100x",
> .of_match_table = hdc100x_dt_ids,
> },
> - .probe = hdc100x_probe,
> + .probe_new = hdc100x_probe,
> .id_table = hdc100x_id,
> };
> module_i2c_driver(hdc100x_driver);
> --
> 2.31.1
>


--
With Best Regards,
Andy Shevchenko