]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ALSA: hdspm: Replace deprecated PCI functions
authorPhilipp Stanner <phasta@kernel.org>
Fri, 4 Apr 2025 12:19:11 +0000 (14:19 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 7 Apr 2025 07:19:58 +0000 (09:19 +0200)
pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250404121911.85277-12-phasta@kernel.org
sound/pci/rme9652/hdspm.c

index 1935de046f0004dc49a1c6eb33f06c2f1e366b34..64de540899551773a54cb6a92b9c2bd63cd7428e 100644 (file)
@@ -6558,13 +6558,12 @@ static int snd_hdspm_create(struct snd_card *card,
 
        pci_set_master(hdspm->pci);
 
-       err = pcim_iomap_regions(pci, 1 << 0, "hdspm");
-       if (err < 0)
-               return err;
+       hdspm->iobase = pcim_iomap_region(pci, 0, "hdspm");
+       if (IS_ERR(hdspm->iobase))
+               return PTR_ERR(hdspm->iobase);
 
        hdspm->port = pci_resource_start(pci, 0);
        io_extent = pci_resource_len(pci, 0);
-       hdspm->iobase = pcim_iomap_table(pci)[0];
        dev_dbg(card->dev, "remapped region (0x%lx) 0x%lx-0x%lx\n",
                        (unsigned long)hdspm->iobase, hdspm->port,
                        hdspm->port + io_extent - 1);