All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Crofts <joshua.crofts1@gmail.com>
To: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
Cc: jic23@kernel.org, gregkh@linuxfoundation.org, nuno.sa@analog.com,
	Michael.Hennerich@analog.com, dlechner@baylibre.com,
	andy@kernel.org, linux@analog.com, linux-iio@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	error27@gmail.com, narcisaanamaria12@gmail.com
Subject: Re: [PATCH 2/3] staging: iio: accel: adis16203: add missing spi_device_id table
Date: Wed, 30 Sep 2026 08:56:40 +0200	[thread overview]
Message-ID: <20260930085640.00000377@gmail.com> (raw)
In-Reply-To: <20260929184900.39515-3-abdelnasserhussein11@gmail.com>

On Tue, 29 Sep 2026 21:48:59 +0300
Abdelnasser Hussein <abdelnasserhussein11@gmail.com> wrote:

> The driver currently relies on OF/DT matching but lacks an SPI device
> ID table. This prevents module auto-loading on systems without device
> tree support.
> 
> Add the spi_device_id table to resolve this and ensure the driver loads
> properly across all supported platforms.
> 
> Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
> ---
>  drivers/staging/iio/accel/adis16203.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/staging/iio/accel/adis16203.c b/drivers/staging/iio/accel/adis16203.c
> index eddb786d4747..905485fd556f 100644
> --- a/drivers/staging/iio/accel/adis16203.c
> +++ b/drivers/staging/iio/accel/adis16203.c
> @@ -11,6 +11,7 @@
>  #include <linux/iio/imu/adis.h>
>  
>  #include <linux/kernel.h>
> +#include <linux/mod_devicetable.h>

No need for mod_devicetable.h, this is imported using spi.h

>  #include <linux/module.h>
>  #include <linux/spi/spi.h>
>  
> @@ -292,12 +293,19 @@ static const struct of_device_id adis16203_of_match[] = {
>  
>  MODULE_DEVICE_TABLE(of, adis16203_of_match);
>  
> +static const struct spi_device_id adis16203_id[] = {
> +	{ "adis16203", 0 },

C99 initializers please.

> +	{ }
> +};
> +MODULE_DEVICE_TABLE(spi, adis16203_id);
> +
>  static struct spi_driver adis16203_driver = {
>  	.driver = {
>  		.name = "adis16203",
>  		.of_match_table = adis16203_of_match,
>  	},
>  	.probe = adis16203_probe,
> +	.id_table = adis16203_id,
>  };
>  module_spi_driver(adis16203_driver);
>  

Additionally, you should delete the MODULE_ALIAS("spi:adis16203") line.

-- 
Kind regards,
Joshua Crofts

  reply	other threads:[~2026-09-30  6:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 18:48 [PATCH 0/3] staging: iio: accel: adis16203: fix axis mapping and cleanups Abdelnasser Hussein
2026-09-29 18:48 ` [PATCH 1/3] staging: iio: accel: adis16203: fix inclination naming and remove unsupported Y-axis Abdelnasser Hussein
2026-09-30  8:24   ` Joshua Crofts
2026-09-30  9:21   ` Andy Shevchenko
2026-09-30 11:34     ` nasser
2026-09-29 18:48 ` [PATCH 2/3] staging: iio: accel: adis16203: add missing spi_device_id table Abdelnasser Hussein
2026-09-30  6:56   ` Joshua Crofts [this message]
2026-09-30 11:35     ` nasser
2026-10-11 23:09   ` Uwe Kleine-König
2026-10-12 13:22     ` Abdelnasser Hussein
2026-09-29 18:49 ` [PATCH 3/3] staging: iio: accel: adis16203: clean up register definitions and drop redundant comments Abdelnasser Hussein
2026-09-30  7:04   ` Joshua Crofts
2026-10-02 14:33 ` [PATCH 0/3] staging: iio: accel: adis16203: fix axis mapping and cleanups Jonathan Cameron
2026-10-02 17:23   ` nasser
2026-10-02 19:54   ` Joshua Crofts
2026-10-03  4:58     ` Abdelnasser Hussein
2026-10-03 15:27       ` Andy Shevchenko

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=20260930085640.00000377@gmail.com \
    --to=joshua.crofts1@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=abdelnasserhussein11@gmail.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux@analog.com \
    --cc=narcisaanamaria12@gmail.com \
    --cc=nuno.sa@analog.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.