Re: [PATCH v4 10/11] ASoC: SOF: Intel: Move binding to display driver outside of deferred probe

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

 



Hey,

On Wed, 30 Aug 2023, Maarten Lankhorst wrote:

> Now that we can use -EPROBE_DEFER, it's no longer required to spin off
> the snd_hdac_i915_init into a workqueue.
> 
> Use the -EPROBE_DEFER mechanism instead, which must be returned in the
> probe function.
> 
> The previously added probe_no_wq can be used for this,
> and we also use the newly added remove_no_wq for unbinding afterwards.
[...]
> @@ -1317,7 +1313,6 @@ int hda_dsp_remove(struct snd_sof_dev *sdev)
>  {
>  	struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
>  	const struct sof_intel_dsp_desc *chip = hda->desc;
> -	struct hdac_bus *bus = sof_to_bus(sdev);
>  	struct pci_dev *pci = to_pci_dev(sdev->dev);
>  	struct nhlt_acpi_table *nhlt = hda->nhlt;
>  
> @@ -1368,10 +1363,12 @@ int hda_dsp_remove(struct snd_sof_dev *sdev)
>  	if (!sdev->dspless_mode_selected)
>  		iounmap(sdev->bar[HDA_DSP_BAR]);
>  
> -	iounmap(bus->remap_addr);
> -
> -	sof_hda_bus_exit(sdev);
> +	return 0;
> +}
>  
> +int hda_dsp_remove_no_wq(struct snd_sof_dev *sdev)
> +{
> +	iounmap(sof_to_bus(sdev)->remap_addr);
>  	hda_codec_i915_exit(sdev);

I think here we drop the call to sof_hda_bus_exit() which should be done 
in hda_dsp_remove_no_wq() to counter hda_init().

Rest looks good to me, the "no_wq" variants do symmetric ops,
so we can handle both wq an non-wq cases.

Br, Kai



[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