# Re: \[PATCH\] staging: fbtft: add spi\_device\_id table

- From: Geert Uytterhoeven \<geert@linux-m68k.org\>
- Date: 2021-11-30 08:16:52 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2021/11/9210648
- Thread: https://ratatoskr.run/linux-fbdev/2021/11/9210590/t.md

```text
Hi Heiner,

On Mon, Nov 29, 2021 at 10:12 PM Heiner Kallweit [ref] wrote:
> After 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT
> compatible") we need the following to make the SPI core happy.
>
> Works for me with a SH1106-based OLED display.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Thanks for your patch!

> --- a/drivers/staging/fbtft/fbtft.h
> +++ b/drivers/staging/fbtft/fbtft.h
> @@ -307,12 +307,19 @@ static const struct of_device_id dt_ids[] = {                              \
>                                                                            \
>  MODULE_DEVICE_TABLE(of, dt_ids);                                           \
>                                                                            \
> +static const struct spi_device_id spi_ids[] = {                            \
> +       { .name = _compatible },                                           \

Shouldn't this be the part of _compatible after the "<vendor>," prefix?

> +       {},                                                                \
> +};                                                                         \
> +                                                                          \
> +MODULE_DEVICE_TABLE(spi, spi_ids);                                        \
>                                                                            \
>  static struct spi_driver fbtft_driver_spi_driver = {                       \
>         .driver = {                                                        \
>                 .name   = _name,                                           \
>                 .of_match_table = dt_ids,                                  \
>         },                                                                 \
> +       .id_table = spi_ids,                                               \
>         .probe  = fbtft_driver_probe_spi,                                  \
>         .remove = fbtft_driver_remove_spi,                                 \
>  };                                                                         \

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
```
