Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Wei Yongjun <weiyongjun@huaweicloud.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	"LI Qingwu" <Qing-wu.Li@leica-geosystems.com.cn>,
	"Tomas Melin" <tomas.melin@vaisala.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Wei Yongjun" <weiyongjun1@huawei.com>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: accel: sca3300: Silent no spi_device_id warning
Date: Mon, 19 Sep 2022 17:02:32 +0100	[thread overview]
Message-ID: <20220919170232.549ca9f6@jic23-huawei> (raw)
In-Reply-To: <20220919150019.823401-1-weiyongjun@huaweicloud.com>

On Mon, 19 Sep 2022 15:00:18 +0000
Wei Yongjun <weiyongjun@huaweicloud.com> wrote:

> From: Wei Yongjun <weiyongjun1@huawei.com>
Hi Wei Yongjun

"Silence" rather than "Silent" in the patch title.
> 
> Add spi_device_id entries to silent following SPI warning:
silence

Please add the extra info that Lars asked for to all these patches:
the main aim here is to ensure driver module autoloading works.

Code in this patch is fine.

Jonathan

> 
> SPI driver sca3300 has no spi_device_id for murata,scl3300
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/iio/accel/sca3300.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/accel/sca3300.c b/drivers/iio/accel/sca3300.c
> index eaa0c9cfda44..693fbe8d6cb9 100644
> --- a/drivers/iio/accel/sca3300.c
> +++ b/drivers/iio/accel/sca3300.c
> @@ -679,12 +679,20 @@ static const struct of_device_id sca3300_dt_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(of, sca3300_dt_ids);
>  
> +static const struct spi_device_id sca3300_ids[] = {
> +	{ "sca3300" },
> +	{ "scl3300" },
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(spi, sca3300_ids);
> +
>  static struct spi_driver sca3300_driver = {
> -	.driver = {
> +	.driver   = {
>  		.name		= SCA3300_ALIAS,
>  		.of_match_table = sca3300_dt_ids,
>  	},
> -	.probe	= sca3300_probe,
> +	.probe	  = sca3300_probe,
> +	.id_table = sca3300_ids,
>  };
>  module_spi_driver(sca3300_driver);
>  


      reply	other threads:[~2022-09-19 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19 15:00 [PATCH] iio: accel: sca3300: Silent no spi_device_id warning Wei Yongjun
2022-09-19 16:02 ` Jonathan Cameron [this message]

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=20220919170232.549ca9f6@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Qing-wu.Li@leica-geosystems.com.cn \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=tomas.melin@vaisala.com \
    --cc=weiyongjun1@huawei.com \
    --cc=weiyongjun@huaweicloud.com \
    /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