[PATCH v3 04/14] ASoC: amd: create acp3x pdm platform device

Mark Brown broonie at kernel.org
Tue May 19 12:53:59 CEST 2020


On Tue, May 19, 2020 at 01:16:54AM +0800, Vijendar Mukunda wrote:

> +	adata->res = devm_kzalloc(&pci->dev,
> +				  sizeof(struct resource) * 2,
> +				  GFP_KERNEL);
> +	if (!adata->res) {
> +		ret = -ENOMEM;
> +		goto de_init;
> +	}
> +
> +	adata->res[0].name = "acp_pdm_iomem";
> +	adata->res[0].flags = IORESOURCE_MEM;
> +	adata->res[0].start = addr;
> +	adata->res[0].end = addr + (ACP_REG_END - ACP_REG_START);
> +	adata->res[1].name = "acp_pdm_irq";
> +	adata->res[1].flags = IORESOURCE_IRQ;
> +	adata->res[1].start = pci->irq;
> +	adata->res[1].end = pci->irq;

Creating the subdevice is good and sensible but this is basically open
coding what the MFD framework does.  The subdevices should probably be
created with that instead.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200519/559af022/attachment.sig>


More information about the Alsa-devel mailing list