Re: [PATCH] ASoC: dwc: disallow building designware_pcm as a module
From: Lubomir Rintel
Date: Tue Apr 18 2017 - 12:13:51 EST
On Tue, 2017-04-18 at 16:18 +0100, Mark Brown wrote:
> On Tue, Apr 18, 2017 at 12:59:54PM +0200, Lubomir Rintel wrote:
> > It makes not sense: the whether the PIO PCM extension is used is
> > hardcoded to the designware_i2s driver and designware_pcm doesn't
> > have any module metadata, causing a kernel taint:
> >
> > Â [ÂÂÂ44.287000] designware_pcm: module license 'unspecified' taints kernel.
> >
> > Signed-off-by: Lubomir Rintel <lkundrak@xxxxx>
>
> This is not a a good approach, there is no technical reason to force the
> driver to be built in.ÂÂIf you need a license tag in the module then add
> that.
I don't think designware_pcm is a separate driver. It looks tightly
coupled with designware_i2s: you can either disable designware_pcm
altogether at build time or always load it together with
designware_i2s.
See sound/soc/dwc/local.h:
#if IS_ENABLED(CONFIG_SND_DESIGNWARE_PCM)
void dw_pcm_push_tx(struct dw_i2s_dev *dev);
int dw_pcm_register(struct platform_device *pdev);
#else
void dw_pcm_push_tx(struct dw_i2s_dev *dev) { }
int dw_pcm_register(struct platform_device *pdev)
{
ÂÂÂÂÂÂÂÂreturn -EINVAL;
}
#endif
Lubo