All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Biju Das <biju.das.au@gmail.com>
Subject: Re: [PATCH 1/2] pinctrl: mcp23s08: Extend match support for OF tables
Date: Mon, 4 Sep 2023 12:09:25 +0300	[thread overview]
Message-ID: <ZPWexXwTHfG9yFlM@smile.fi.intel.com> (raw)
In-Reply-To: <20230902090937.32195-2-biju.das.jz@bp.renesas.com>

On Sat, Sep 02, 2023 at 10:09:36AM +0100, Biju Das wrote:
> The driver has OF match table, still it uses ID lookup table for
> retrieving match data. Currently the driver is working on the
> assumption that a I2C device registered via OF will always match a
> legacy I2C device ID. The correct approach is to have an OF device ID
> table using of_device_match_data() if the devices are registered via OF.

...

> -	const struct i2c_device_id *id = i2c_client_get_device_id(client);
>  	struct device *dev = &client->dev;
> -	unsigned int type = id->driver_data;

> +	unsigned int type;


Now it's shorter than below line, so move it further.

>  	struct mcp23s08 *mcp;
>  	int ret;

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-09-04  9:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02  9:09 [PATCH 0/2] Match data improvements for mcp23s08 driver Biju Das
2023-09-02  9:09 ` [PATCH 1/2] pinctrl: mcp23s08: Extend match support for OF tables Biju Das
2023-09-04  9:09   ` Andy Shevchenko [this message]
2023-09-02  9:09 ` [PATCH 2/2] pinctrl: mcp23s08: Simplify probe() Biju Das
2023-09-04  9:12   ` Andy Shevchenko
2023-09-05 11:31   ` Dan Carpenter
2023-09-04  9:14 ` [PATCH 0/2] Match data improvements for mcp23s08 driver Andy Shevchenko

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=ZPWexXwTHfG9yFlM@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.