Re: [PATCH 1/2] sound: codecs: gtm601: add Broadmobi bm818 sound profile

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

 



On Mon, Dec 02, 2019 at 10:48:30AM -0700, Angus Ainslie (Purism) wrote:

> +	if (np && of_device_is_compatible(np, "broadmobi,bm818"))
> +		dai_driver = &bm818_dai;

Rather than having a tree of these it'd be better if...

>  #if defined(CONFIG_OF)
>  static const struct of_device_id gtm601_codec_of_match[] = {
>  	{ .compatible = "option,gtm601", },
> +	{ .compatible = "broadmobi,bm818", },
>  	{},
>  };

...this used the data you can provide along with the of_match as
the dai_driver so the probe function doesn't have to know about
the individual variants.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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