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

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

 



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.

Attachment: signature.asc
Description: PGP signature


[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