ALSA: rme9652: Use pure devres PCI
authorPhilipp Stanner <phasta@kernel.org>
Wed, 23 Apr 2025 07:53:35 +0000 (09:53 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2025 07:21:34 +0000 (09:21 +0200)
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().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250423075346.45907-18-phasta@kernel.org
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/rme9652.c

index dc326face54af8fa37e97830de8b711efeba4836..873b7eadfc501d12f829a7a4bae014c3cb4890f1 100644 (file)
@@ -5277,7 +5277,7 @@ static int snd_hdsp_create(struct snd_card *card,
 
        pci_set_master(hdsp->pci);
 
-       err = pci_request_regions(pci, "hdsp");
+       err = pcim_request_all_regions(pci, "hdsp");
        if (err < 0)
                return err;
        hdsp->port = pci_resource_start(pci, 0);
index 5b8dd7b0a02ca6ebeedf998e61759367af467ce3..34d9c7995ddd02f40764bbacc8b7a75657b48161 100644 (file)
@@ -2406,7 +2406,7 @@ static int snd_rme9652_create(struct snd_card *card,
 
        spin_lock_init(&rme9652->lock);
 
-       err = pci_request_regions(pci, "rme9652");
+       err = pcim_request_all_regions(pci, "rme9652");
        if (err < 0)
                return err;
        rme9652->port = pci_resource_start(pci, 0);