Message ID | 20220728125435.3336618-2-potin.lai.pt@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | iio: humidity: hdc100x: add manufacturer and device ID check | expand |
On Thu, Jul 28, 2022 at 3:32 PM Potin Lai <potin.lai.pt@gmail.com> wrote: > > Switch to probe_new callback due to probe is deprecated soon. Just noticed that commit message is a bit not okay in a few ways: 1) we refer to the callbacks like ->probe_new(); 2) we don't know when we deprecate it, the point here is not that, but unused id parameter in the current code.
On 7/29/22 04:41, Andy Shevchenko wrote: > On Thu, Jul 28, 2022 at 3:32 PM Potin Lai <potin.lai.pt@gmail.com> wrote: >> Switch to probe_new callback due to probe is deprecated soon. > Just noticed that commit message is a bit not okay in a few ways: > 1) we refer to the callbacks like ->probe_new(); > 2) we don't know when we deprecate it, the point here is not that, but > unused id parameter in the current code. > > Thanks for point it out, is it OK leave the message as it is? or you prefer to submit another version to fix it? If new version required, I will also add another patch for struct device pointer you mentioned in the other reply. Just want to confirm that is the new message looks OK? New message: Switch ->porbe() to new callback ->probe_new() Thanks, Potin
On Fri, Jul 29, 2022 at 2:45 AM Potin Lai <potin.lai.pt@gmail.com> wrote: > On 7/29/22 04:41, Andy Shevchenko wrote: > > On Thu, Jul 28, 2022 at 3:32 PM Potin Lai <potin.lai.pt@gmail.com> wrote: > >> Switch to probe_new callback due to probe is deprecated soon. > > Just noticed that commit message is a bit not okay in a few ways: > > 1) we refer to the callbacks like ->probe_new(); > > 2) we don't know when we deprecate it, the point here is not that, but > > unused id parameter in the current code. ^^^ read this again and follow below. > Thanks for point it out, is it OK leave the message as it is? or you prefer to submit another version to fix it? > If new version required, I will also add another patch for struct device pointer you mentioned in the other reply. > > Just want to confirm that is the new message looks OK? > New message: > Switch ->porbe() to new callback ->probe_new() You need to answer the question "why?" you are doing this and that. The above is just saying "what?". See above.
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);