[PATCH] ASoC: stm32: sai: Use of_device_get_match_data() to simplify code

Mark Brown broonie at kernel.org
Mon May 23 11:57:05 PDT 2022


On Mon, May 23, 2022 at 03:28:48PM +0200, Olivier MOYSAN wrote:

> The current patch requires a change in the driver.
> Either changing STM_SAI_x_ID enums, or replacing data by a struct.
> For instance:
> struct stm32_sai_comp_data {
> 	unsigned int id;
> }
> struct stm32_sai_comp_data stm32_sai_comp_data_a = {
> 	.id = STM_SAI_A_ID;
> }
> struct of_device_id stm32_sai_sub_ids[] = {
> 	.data = &stm32_sai_comp_data_a},
> }

Either approach works for me (or a revert for that matter).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220523/f6452371/attachment-0001.sig>


More information about the linux-arm-kernel mailing list