From: Guenter Roeck <linux@roeck-us.net>
To: Stephen Kitt <steve@sk2.org>
Cc: Riku Voipio <riku.voipio@iki.fi>,
Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (f75375s) use simple i2c probe
Date: Fri, 21 Aug 2020 11:31:05 -0700 [thread overview]
Message-ID: <20200821183105.GA74215@roeck-us.net> (raw)
In-Reply-To: <20200821160159.591293-1-steve@sk2.org>
On Fri, Aug 21, 2020 at 06:01:59PM +0200, Stephen Kitt wrote:
> As part of the ongoing i2c transition to the simple probe
> ("probe_new"), this patch uses i2c_match_id to retrieve the
> driver_data for the probed device. The id parameter is thus no longer
> necessary and the simple probe can be used instead.
>
> Signed-off-by: Stephen Kitt <steve@sk2.org>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/f75375s.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c
> index eb847a7d6b83..3e567be60fb1 100644
> --- a/drivers/hwmon/f75375s.c
> +++ b/drivers/hwmon/f75375s.c
> @@ -113,8 +113,7 @@ struct f75375_data {
>
> static int f75375_detect(struct i2c_client *client,
> struct i2c_board_info *info);
> -static int f75375_probe(struct i2c_client *client,
> - const struct i2c_device_id *id);
> +static int f75375_probe(struct i2c_client *client);
> static int f75375_remove(struct i2c_client *client);
>
> static const struct i2c_device_id f75375_id[] = {
> @@ -130,7 +129,7 @@ static struct i2c_driver f75375_driver = {
> .driver = {
> .name = "f75375",
> },
> - .probe = f75375_probe,
> + .probe_new = f75375_probe,
> .remove = f75375_remove,
> .id_table = f75375_id,
> .detect = f75375_detect,
> @@ -814,8 +813,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data,
>
> }
>
> -static int f75375_probe(struct i2c_client *client,
> - const struct i2c_device_id *id)
> +static int f75375_probe(struct i2c_client *client)
> {
> struct f75375_data *data;
> struct f75375s_platform_data *f75375s_pdata =
> @@ -832,7 +830,7 @@ static int f75375_probe(struct i2c_client *client,
>
> i2c_set_clientdata(client, data);
> mutex_init(&data->update_lock);
> - data->kind = id->driver_data;
> + data->kind = i2c_match_id(f75375_id, client)->driver_data;
>
> err = sysfs_create_group(&client->dev.kobj, &f75375_group);
> if (err)
prev parent reply other threads:[~2020-08-21 18:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 16:01 Stephen Kitt
2020-08-21 18:31 ` Guenter Roeck [this message]
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=20200821183105.GA74215@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riku.voipio@iki.fi \
--cc=steve@sk2.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
all inboxes | Powered by JetHome®