mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ardelean, Alexandru" <alexandru.Ardelean@analog.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Cc: "Tachici, Alexandru" <Alexandru.Tachici@analog.com>
Subject: Re: [PATCH v4 2/2] iio: adc: ad7192: move ad7192_of_match table closer to the end of the file
Date: Mon, 13 Jul 2020 16:11:39 +0000	[thread overview]
Message-ID: <191e9880ea3dd0e127b102f006c208f31d57c421.camel@analog.com> (raw)
In-Reply-To: <20200415055804.17971-2-alexandru.ardelean@analog.com>

On Wed, 2020-04-15 at 08:58 +0300, Alexandru Ardelean 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.

This looks like it could be applied now.
The iio/testing branch seems to have patch [1/2].

Thanks
Alex

> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
>  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 1431f555daa6..fd89a5115c55 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",

  reply	other threads:[~2020-07-13 16:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15  5:58 [PATCH v4 1/2] iio: adc: ad7192: fix null pointer de-reference crash during probe Alexandru Ardelean
2020-04-15  5:58 ` [PATCH v4 2/2] iio: adc: ad7192: move ad7192_of_match table closer to the end of the file Alexandru Ardelean
2020-07-13 16:11   ` Ardelean, Alexandru [this message]
2020-07-18 16:26     ` Jonathan Cameron
2020-04-18 18:31 ` [PATCH v4 1/2] iio: adc: ad7192: fix null pointer de-reference crash during probe Jonathan Cameron

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=191e9880ea3dd0e127b102f006c208f31d57c421.camel@analog.com \
    --to=alexandru.ardelean@analog.com \
    --cc=Alexandru.Tachici@analog.com \
    --cc=linux-iio@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®