Re: [PATCH] ASoC: soc-core: Create device_link to ensure correct suspend order

From: Richard Fitzgerald

Date: Tue Jun 02 2026 - 09:49:05 EST


On 02/06/2026 2:31 pm, Mark Brown wrote:
On Mon, Jun 01, 2026 at 03:28:35PM +0100, Richard Fitzgerald wrote:

+ for_each_card_components(card, component) {
+ if (!device_link_add(card->dev, component->dev,
+ DL_FLAG_AUTOREMOVE_CONSUMER)) {
+ dev_warn(card->dev, "Failed to create device link to %s\n",
+ dev_name(component->dev));
+ ret = -EINVAL;
+ goto probe_end;

Do we still have devices registering separate components with the same
device for DMA and DAI operations? They'd end up duplicating the links
here.

Ok, weird, but I agree it's possible for one driver to register multiple
components. I'll make a V2 that skips the device link if the component
dev is the same as the card dev.