[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZNufBsIT7KvEDA/c@smile.fi.intel.com>
Date: Tue, 15 Aug 2023 18:51:34 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Wolfram Sang <wsa@...nel.org>, Andi Shyti <andi.shyti@...nel.org>,
Biju Das <biju.das.jz@...renesas.com>,
Jonathan Cameron <jic23@...nel.org>,
Michael Hennerich <michael.hennerich@...log.com>,
Peter Rosin <peda@...ntia.se>, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 3/4] i2c: mux: pca954x: convert to using a pointer in
i2c_device_id
On Mon, Aug 14, 2023 at 02:52:51PM -0700, Dmitry Torokhov wrote:
> Switch the driver to use newly added "data" pointer in i2c_device_id to
> streamline DT and legacy flows.
...
> @@ -206,7 +206,7 @@ static const struct of_device_id pca954x_of_match[] = {
> { .compatible = "nxp,pca9847", .data = &chips[pca_9847] },
> { .compatible = "nxp,pca9848", .data = &chips[pca_9848] },
> { .compatible = "nxp,pca9849", .data = &chips[pca_9849] },
> - {}
> + { }
> };
> MODULE_DEVICE_TABLE(of, pca954x_of_match);
Stray change.
...
> data->chip = device_get_match_data(dev);
> if (!data->chip)
> - data->chip = &chips[id->driver_data];
> + data->chip = id->data;
Same, why not to use that helper and if anything, modify it instead.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists