Re: [PATCH] spi: Madera codecs: add missing of table registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 22, 2019 at 09:13:50PM +0200, Daniel Gomez wrote:
> MODULE_DEVICE_TABLE(of, <of_match_table> should be called to complete DT
> OF mathing mechanism and register it.
> 
> Before this patch:
> modinfo drivers/mfd/madera-spi.ko  | grep alias
> alias:          spi:wm1840
> alias:          spi:cs47l91
> alias:          spi:cs47l90
> alias:          spi:cs47l85
> alias:          spi:cs47l35
> 
> After this patch:
> modinfo drivers/mfd/madera-spi.ko  | grep alias
> alias:          spi:wm1840
> alias:          spi:cs47l91
> alias:          spi:cs47l90
> alias:          spi:cs47l85
> alias:          spi:cs47l35
> alias:          of:N*T*Ccirrus,wm1840C*
> alias:          of:N*T*Ccirrus,wm1840
> alias:          of:N*T*Ccirrus,cs47l91C*
> alias:          of:N*T*Ccirrus,cs47l91
> alias:          of:N*T*Ccirrus,cs47l90C*
> alias:          of:N*T*Ccirrus,cs47l90
> alias:          of:N*T*Ccirrus,cs47l85C*
> alias:          of:N*T*Ccirrus,cs47l85
> alias:          of:N*T*Ccirrus,cs47l35C*
> alias:          of:N*T*Ccirrus,cs47l35
> 
> Reported-by: Javier Martinez Canillas <javier@xxxxxxxxxxxx>
> Signed-off-by: Daniel Gomez <dagmcr@xxxxxxxxx>
> ---
>  drivers/mfd/madera-spi.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/mfd/madera-spi.c b/drivers/mfd/madera-spi.c
> index 4c398b2..1128584 100644
> --- a/drivers/mfd/madera-spi.c
> +++ b/drivers/mfd/madera-spi.c
> @@ -121,6 +121,16 @@ static const struct spi_device_id madera_spi_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(spi, madera_spi_ids);
>  
> +const struct of_device_id madera_of_match[] = {
> +	{ .compatible = "cirrus,cs47l35", .data = (void *)CS47L35 },
> +	{ .compatible = "cirrus,cs47l85", .data = (void *)CS47L85 },
> +	{ .compatible = "cirrus,cs47l90", .data = (void *)CS47L90 },
> +	{ .compatible = "cirrus,cs47l91", .data = (void *)CS47L91 },
> +	{ .compatible = "cirrus,wm1840", .data = (void *)WM1840 },
> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, madera_of_match);
> +

This is definitely an oversight but it would be worth
looking into if it is possible to use the existing table in
madera-core.c rather than adding new tables. The I2C will also
need fixed so it would be best to share.

Thanks,
Charles

>  static struct spi_driver madera_spi_driver = {
>  	.driver = {
>  		.name	= "madera",
> -- 
> 2.7.4
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux