[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ebf0ccd0-9429-43b6-b56b-73feeb856593@linux.intel.com>
Date: Thu, 24 Apr 2025 12:21:57 +0200
From: Amadeusz Sławiński
<amadeuszx.slawinski@...ux.intel.com>
To: Philipp Stanner <phasta@...nel.org>,
Cezary Rojewski <cezary.rojewski@...el.com>,
Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
Peter Ujfalusi <peter.ujfalusi@...ux.intel.com>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.dev>,
Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, Daniel Baluta <daniel.baluta@....com>,
Charles Keepax <ckeepax@...nsource.cirrus.com>,
Damien Le Moal <dlemoal@...nel.org>
Cc: linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
sound-open-firmware@...a-project.org
Subject: Re: [PATCH v2 2/4] ASoC: intel/avs: Use pure devres PCI
On 2025-04-23 10:28, Philipp Stanner wrote:
> pci_request_regions() is a hybrid function which becomes managed if
> pcim_enable_device() was called before. This hybrid nature is deprecated
> and should not be used anymore.
>
> Replace pci_request_regions() with the always-managed function
> pcim_request_all_regions().
>
> Remove the goto jump to pci_release_regions(), since pcim_ functions
> clean up automatically.
>
> Signed-off-by: Philipp Stanner <phasta@...nel.org>
> ---
> sound/soc/intel/avs/core.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c
> index 8fbf33e30dfc..dafe46973146 100644
> --- a/sound/soc/intel/avs/core.c
> +++ b/sound/soc/intel/avs/core.c
> @@ -445,7 +445,7 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
> return ret;
> }
>
> - ret = pci_request_regions(pci, "AVS HDAudio");
> + ret = pcim_request_all_regions(pci, "AVS HDAudio");
> if (ret < 0)
> return ret;
>
> @@ -454,8 +454,7 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
> bus->remap_addr = pci_ioremap_bar(pci, 0);
> if (!bus->remap_addr) {
> dev_err(bus->dev, "ioremap error\n");
> - ret = -ENXIO;
> - goto err_remap_bar0;
> + return -ENXIO;
> }
>
> adev->dsp_ba = pci_ioremap_bar(pci, 4);
> @@ -512,8 +511,6 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
> iounmap(adev->dsp_ba);
> err_remap_bar4:
> iounmap(bus->remap_addr);
> -err_remap_bar0:
> - pci_release_regions(pci);
Hm... shouldn't we also drop call to pci_release_regions() in
avs_pci_remove()?
> return ret;
> }
>
Nitpick: If there will be v2, can you also align title with how it
usually is in this directory:
ASoC: Intel: avs: Use pure devres PCI
Powered by blists - more mailing lists