[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231220172218.a81bf81bdf502100589dd0b6@hugovil.com>
Date: Wed, 20 Dec 2023 17:22:18 -0500
From: Hugo Villeneuve <hugo@...ovil.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: gregkh@...uxfoundation.org, jirislaby@...nel.org, jringle@...dpoint.com,
kubakici@...pl, phil@...pberrypi.org, bo.svangard@...eddedart.se,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org, Hugo Villeneuve
<hvilleneuve@...onoff.com>
Subject: Re: [PATCH 06/18] serial: sc16is7xx: use
spi_get_device_match_data()
On Wed, 20 Dec 2023 17:44:52 +0200
Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> On Tue, Dec 19, 2023 at 12:18:50PM -0500, Hugo Villeneuve wrote:
> > From: Hugo Villeneuve <hvilleneuve@...onoff.com>
> >
> > Use preferred spi_get_device_match_data() instead of
> > device_get_match_data() and spi_get_device_id() to get the driver match
> > data.
>
> ...
>
> > + devtype = (struct sc16is7xx_devtype *)spi_get_device_match_data(spi);
>
> Nice one, but drop the casting. (Yes, make sure the assignee is const. It might
> require an additional change.)
Done, devtype was already const.
>
> > + if (!devtype) {
> > + dev_err(&spi->dev, "Failed to match device\n");
> > + return -ENODEV;
>
> return dev_err_probe(...);
>
> ?
Yes, done for V2.
Also done the same two changes for the I2C part.
Hugo.
Powered by blists - more mailing lists