linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hennerich <michael.hennerich@analog.com>
To: Peter Rosin <peda@axentia.se>, linux-kernel@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Vadim Pasternak <vadimp@mellanox.com>,
	Michael Shych <michaelsh@mellanox.com>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH 1/4] i2c: mux: ltc4306: switch to using .probe_new
Date: Wed, 18 Apr 2018 11:26:16 +0200	[thread overview]
Message-ID: <bc5637c3-5e09-b01f-8b9d-f7dcb3b578e1@analog.com> (raw)
In-Reply-To: <20180417143233.25145-2-peda@axentia.se>

On 17.04.2018 16:32, Peter Rosin wrote:
> Use the new probe style for i2c drivers.
> 
> Signed-off-by: Peter Rosin <peda@axentia.se>

Thanks Peter,

Don't know why i2c needs a new probe style to save one function parameter...
But this patch looks otherwise good to me.

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   drivers/i2c/muxes/i2c-mux-ltc4306.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c
> index 311b1cced0c0..a9af93259b19 100644
> --- a/drivers/i2c/muxes/i2c-mux-ltc4306.c
> +++ b/drivers/i2c/muxes/i2c-mux-ltc4306.c
> @@ -206,8 +206,7 @@ static const struct of_device_id ltc4306_of_match[] = {
>   };
>   MODULE_DEVICE_TABLE(of, ltc4306_of_match);
>   
> -static int ltc4306_probe(struct i2c_client *client,
> -			 const struct i2c_device_id *id)
> +static int ltc4306_probe(struct i2c_client *client)
>   {
>   	struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent);
>   	const struct chip_desc *chip;
> @@ -221,7 +220,7 @@ static int ltc4306_probe(struct i2c_client *client,
>   	chip = of_device_get_match_data(&client->dev);
>   
>   	if (!chip)
> -		chip = &chips[id->driver_data];
> +		chip = &chips[i2c_match_id(ltc4306_id, client)->driver_data];
>   
>   	idle_disc = device_property_read_bool(&client->dev,
>   					      "i2c-mux-idle-disconnect");
> @@ -310,7 +309,7 @@ static struct i2c_driver ltc4306_driver = {
>   		.name	= "ltc4306",
>   		.of_match_table = of_match_ptr(ltc4306_of_match),
>   	},
> -	.probe		= ltc4306_probe,
> +	.probe_new	= ltc4306_probe,
>   	.remove		= ltc4306_remove,
>   	.id_table	= ltc4306_id,
>   };
> 


-- 
Greetings,
Michael

--
Analog Devices GmbH      Otl-Aicher Strasse 60-64      80807 München
Sitz der Gesellschaft München, Registergericht München HRB 40368,
Geschäftsführer: Peter Kolberg, Ali Raza Husain, Eileen Wynne

  reply	other threads:[~2018-04-18  9:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 14:32 [PATCH 0/4] i2c: mux: switch to using .probe_new Peter Rosin
2018-04-17 14:32 ` [PATCH 1/4] i2c: mux: ltc4306: " Peter Rosin
2018-04-18  9:26   ` Michael Hennerich [this message]
2018-05-19 21:55     ` Peter Rosin
2018-04-17 14:32 ` [PATCH 2/4] i2c: mux: mlxcpld: " Peter Rosin
2018-04-17 14:32 ` [PATCH 3/4] i2c: mux: pca9541: " Peter Rosin
2018-04-17 14:32 ` [PATCH 4/4] i2c: mux: pca954x: " Peter Rosin

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=bc5637c3-5e09-b01f-8b9d-f7dcb3b578e1@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=michaelsh@mellanox.com \
    --cc=peda@axentia.se \
    --cc=vadimp@mellanox.com \
    --cc=wsa@the-dreams.de \
    /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;
as well as URLs for NNTP newsgroup(s).