Message ID | 4a0f0e351941201d00b2cd8e2157d3b0181dc19e.1651348913.git.mchehab@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Let userspace know when snd-hda-intel needs i915 | expand |
On Sat, 30 Apr 2022 22:04:55 +0200, Mauro Carvalho Chehab wrote: > > On some devices, the hda driver needs to hook into a video driver, > in order to be able to properly access the audio hardware and/or > the power management function. > > That's the case of several snd_hda_intel devices that depends on > i915 driver. > > Ensure that a proper reference between the snd-hda driver needing > such binding is shown at /proc/modules, in order to allow userspace > to know about such binding. > > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Maybe I was too late to the game (just back from vacation), but FWIW: Reviewed-by: Takashi Iwai <tiwai@suse.de> thanks, Takashi
diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c index bb37e7e0bd79..7789873ddf47 100644 --- a/sound/hda/hdac_component.c +++ b/sound/hda/hdac_component.c @@ -199,7 +199,7 @@ static int hdac_component_master_bind(struct device *dev) } /* pin the module to avoid dynamic unbinding, but only if given */ - if (!try_module_get(acomp->ops->owner)) { + if (!try_module_get_owner(acomp->ops->owner, dev->driver->owner)) { ret = -ENODEV; goto out_unbind; }
On some devices, the hda driver needs to hook into a video driver, in order to be able to properly access the audio hardware and/or the power management function. That's the case of several snd_hda_intel devices that depends on i915 driver. Ensure that a proper reference between the snd-hda driver needing such binding is shown at /proc/modules, in order to allow userspace to know about such binding. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> --- See [PATCH v5 0/2] at: https://lore.kernel.org/all/cover.1651348913.git.mchehab@kernel.org/ sound/hda/hdac_component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)