lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 May 2021 08:41:43 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Zou Wei <zou_wei@...wei.com>, cezary.rojewski@...el.com,
        liam.r.girdwood@...ux.intel.com, yang.jie@...ux.intel.com,
        broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
        kuninori.morimoto.gx@...esas.com, kai.vehmanen@...ux.intel.com,
        brent.lu@...el.com, ranjani.sridharan@...ux.intel.com,
        yong.zhi@...el.com, dharageswari.r@...el.com,
        sathyanarayana.nujella@...el.com, fred.oh@...ux.intel.com,
        tzungbi@...gle.com
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] ASoC: intel/boards: add missing MODULE_DEVICE_TABLE



On 5/11/21 10:54 PM, Zou Wei wrote:
> This patch adds missing MODULE_DEVICE_TABLE definition which generates
> correct modalias for automatic loading of this driver when it is built
> as an external module.

I have a limited understanding of all this, but we already support the 
machine drivers as modules and things work fine.

I wonder if this MODULE_DEVICE_TABLE generates the alias automatically, 
which would make the existing ones added manually at the end of the 
files unnecessary? If that was the case, then we should remove those 
MODULE_ALIAS as well, no?

MODULE_DESCRIPTION("SOF Audio Machine driver");
MODULE_AUTHOR("Bard Liao <bard.liao@...el.com>");
MODULE_AUTHOR("Sathya Prakash M R <sathya.prakash.m.r@...el.com>");
MODULE_AUTHOR("Brent Lu <brent.lu@...el.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:sof_rt5682");
MODULE_ALIAS("platform:tgl_max98357a_rt5682");
MODULE_ALIAS("platform:jsl_rt5682_rt1015");
MODULE_ALIAS("platform:tgl_max98373_rt5682");
MODULE_ALIAS("platform:jsl_rt5682_max98360a");
MODULE_ALIAS("platform:cml_rt1015_rt5682");
MODULE_ALIAS("platform:tgl_rt1011_rt5682");
MODULE_ALIAS("platform:jsl_rt5682_rt1015p");

> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zou Wei <zou_wei@...wei.com>
> ---
>   sound/soc/intel/boards/sof_da7219_max98373.c | 1 +
>   sound/soc/intel/boards/sof_rt5682.c          | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/sound/soc/intel/boards/sof_da7219_max98373.c b/sound/soc/intel/boards/sof_da7219_max98373.c
> index f3cb077..8d1ad89 100644
> --- a/sound/soc/intel/boards/sof_da7219_max98373.c
> +++ b/sound/soc/intel/boards/sof_da7219_max98373.c
> @@ -440,6 +440,7 @@ static const struct platform_device_id board_ids[] = {
>   	},
>   	{ }
>   };
> +MODULE_DEVICE_TABLE(platform, board_ids);
>   
>   static struct platform_driver audio = {
>   	.probe = audio_probe,
> diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
> index 58548ea..cf1d053 100644
> --- a/sound/soc/intel/boards/sof_rt5682.c
> +++ b/sound/soc/intel/boards/sof_rt5682.c
> @@ -968,6 +968,7 @@ static const struct platform_device_id board_ids[] = {
>   	},
>   	{ }
>   };
> +MODULE_DEVICE_TABLE(platform, board_ids);
>   
>   static struct platform_driver sof_audio = {
>   	.probe = sof_audio_probe,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ