lkml.org 
[lkml]   [2020]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 2/2] iio: adc: ad7192: move ad7192_of_match table closer to the end of the file
Date
On Mon, 2020-04-13 at 17:14 +0100, Jonathan Cameron wrote:
> On Mon, 13 Apr 2020 11:20:44 +0300
> Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
>
> > The change is more cosmetic. There is no need to reference this table in
> > the probe function since 'of_device_get_match_data' is used, which obtains
> > this information from the driver object.
> >
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> I'm obviously not going to take this one as a fix. It's a reasonable patch
> so feel free to remind me of it's existence once the fix has worked its
> way around to be in my togreg/testing branch.

Ack.

Thanks
Alex

>
> Thanks,
>
> Jonathan
>
> > ---
> > drivers/iio/adc/ad7192.c | 18 +++++++++---------
> > 1 file changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/iio/adc/ad7192.c b/drivers/iio/adc/ad7192.c
> > index 7e8662c5cb0e..cef61f962e60 100644
> > --- a/drivers/iio/adc/ad7192.c
> > +++ b/drivers/iio/adc/ad7192.c
> > @@ -908,15 +908,6 @@ static int ad7192_channels_config(struct iio_dev
> > *indio_dev)
> > return 0;
> > }
> >
> > -static const struct of_device_id ad7192_of_match[] = {
> > - { .compatible = "adi,ad7190", .data = &ad7192_chip_info_tbl[ID_AD7190]
> > },
> > - { .compatible = "adi,ad7192", .data = &ad7192_chip_info_tbl[ID_AD7192]
> > },
> > - { .compatible = "adi,ad7193", .data = &ad7192_chip_info_tbl[ID_AD7193]
> > },
> > - { .compatible = "adi,ad7195", .data = &ad7192_chip_info_tbl[ID_AD7195]
> > },
> > - {}
> > -};
> > -MODULE_DEVICE_TABLE(of, ad7192_of_match);
> > -
> > static int ad7192_probe(struct spi_device *spi)
> > {
> > struct ad7192_state *st;
> > @@ -1050,6 +1041,15 @@ static int ad7192_remove(struct spi_device *spi)
> > return 0;
> > }
> >
> > +static const struct of_device_id ad7192_of_match[] = {
> > + { .compatible = "adi,ad7190", .data = &ad7192_chip_info_tbl[ID_AD7190]
> > },
> > + { .compatible = "adi,ad7192", .data = &ad7192_chip_info_tbl[ID_AD7192]
> > },
> > + { .compatible = "adi,ad7193", .data = &ad7192_chip_info_tbl[ID_AD7193]
> > },
> > + { .compatible = "adi,ad7195", .data = &ad7192_chip_info_tbl[ID_AD7195]
> > },
> > + {}
> > +};
> > +MODULE_DEVICE_TABLE(of, ad7192_of_match);
> > +
> > static struct spi_driver ad7192_driver = {
> > .driver = {
> > .name = "ad7192",
\
 
 \ /
  Last update: 2020-04-14 07:11    [W:0.057 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site