linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] sound: Replace deprecated PCI functions
@ 2025-04-04 12:19 Philipp Stanner
  2025-04-04 12:19 ` [PATCH 01/11] ALSA: ad1889: " Philipp Stanner
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated by the
PCI subsystem. In sound/, they can easily be replaced with
pcim_iomap_region().

This series was around some time in late summer last year as a single
patch. I lost track of it for a while, but Takashi Iwai (AFAIR)
requested that I split it by component.

So that's being done here. Feel free to squash the patches as you like.

P.

Philipp Stanner (11):
  ALSA: ad1889: Replace deprecated PCI functions
  ALSA: atiixp: Replace deprecated PCI functions
  ALSA: au88x0: Replace deprecated PCI functions
  ALSA: aw2: Replace deprecated PCI functions
  ALSA: bt87x: Replace deprecated PCI functions
  ALSA: cs4281: Replace deprecated PCI functions
  ALSA: hda_intel: Replace deprecated PCI functions
  ALSA: cs5530: Replace deprecated PCI functions
  ALSA: lola: Replace deprecated PCI functions
  ALSA: hdspm: Replace deprecated PCI functions
  ASoC: loongson: Replace deprecated PCI functions

 sound/pci/ad1889.c                    |  7 +++----
 sound/pci/atiixp.c                    |  7 +++----
 sound/pci/atiixp_modem.c              |  7 +++----
 sound/pci/au88x0/au88x0.c             |  7 +++----
 sound/pci/aw2/aw2-alsa.c              |  7 +++----
 sound/pci/bt87x.c                     |  7 +++----
 sound/pci/cs4281.c                    | 13 +++++++------
 sound/pci/cs5530.c                    |  7 +++----
 sound/pci/hda/hda_intel.c             |  7 +++----
 sound/pci/lola/lola.c                 | 16 +++++++++++-----
 sound/pci/rme9652/hdspm.c             |  7 +++----
 sound/soc/loongson/loongson_i2s_pci.c | 13 +++++++------
 12 files changed, 52 insertions(+), 53 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 01/11] ALSA: ad1889: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 02/11] ALSA: atiixp: " Philipp Stanner
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.

Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/ad1889.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index 9ed778b6b03c..ac27a93ce4ff 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -810,12 +810,11 @@ snd_ad1889_create(struct snd_card *card, struct pci_dev *pci)
 	chip->irq = -1;
 
 	/* (1) PCI resource allocation */
-	err = pcim_iomap_regions(pci, 1 << 0, card->driver);
-	if (err < 0)
-		return err;
+	chip->iobase = pcim_iomap_region(pci, 0, card->driver);
+	if (IS_ERR(chip->iobase))
+		return PTR_ERR(chip->iobase);
 
 	chip->bar = pci_resource_start(pci, 0);
-	chip->iobase = pcim_iomap_table(pci)[0];
 	
 	pci_set_master(pci);
 
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 02/11] ALSA: atiixp: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
  2025-04-04 12:19 ` [PATCH 01/11] ALSA: ad1889: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 03/11] ALSA: au88x0: " Philipp Stanner
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/atiixp.c       | 7 +++----
 sound/pci/atiixp_modem.c | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index df2fef726d60..427006be240b 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -1544,11 +1544,10 @@ static int snd_atiixp_init(struct snd_card *card, struct pci_dev *pci)
 	chip->card = card;
 	chip->pci = pci;
 	chip->irq = -1;
-	err = pcim_iomap_regions(pci, 1 << 0, "ATI IXP AC97");
-	if (err < 0)
-		return err;
+	chip->remap_addr = pcim_iomap_region(pci, 0, "ATI IXP AC97");
+	if (IS_ERR(chip->remap_addr))
+		return PTR_ERR(chip->remap_addr);
 	chip->addr = pci_resource_start(pci, 0);
-	chip->remap_addr = pcim_iomap_table(pci)[0];
 
 	if (devm_request_irq(&pci->dev, pci->irq, snd_atiixp_interrupt,
 			     IRQF_SHARED, KBUILD_MODNAME, chip)) {
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index eb569539f322..8d3083b9b024 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -1174,11 +1174,10 @@ static int snd_atiixp_init(struct snd_card *card, struct pci_dev *pci)
 	chip->card = card;
 	chip->pci = pci;
 	chip->irq = -1;
-	err = pcim_iomap_regions(pci, 1 << 0, "ATI IXP MC97");
-	if (err < 0)
-		return err;
+	chip->remap_addr = pcim_iomap_region(pci, 0, "ATI IXP MC97");
+	if (IS_ERR(chip->remap_addr))
+		return PTR_ERR(chip->remap_addr);
 	chip->addr = pci_resource_start(pci, 0);
-	chip->remap_addr = pcim_iomap_table(pci)[0];
 
 	if (devm_request_irq(&pci->dev, pci->irq, snd_atiixp_interrupt,
 			     IRQF_SHARED, KBUILD_MODNAME, chip)) {
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 03/11] ALSA: au88x0: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
  2025-04-04 12:19 ` [PATCH 01/11] ALSA: ad1889: " Philipp Stanner
  2025-04-04 12:19 ` [PATCH 02/11] ALSA: atiixp: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 04/11] ALSA: aw2: " Philipp Stanner
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Additionally, the "name" parameter of pcim_iomap_region() should reflect
the driver's, not the hardware's, name. Pass the correct parameter.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/au88x0/au88x0.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index 62b10b0e07b1..fd986247331a 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -160,12 +160,11 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci)
 	// (1) PCI resource allocation
 	// Get MMIO area
 	//
-	err = pcim_iomap_regions(pci, 1 << 0, CARD_NAME_SHORT);
-	if (err)
-		return err;
+	chip->mmio = pcim_iomap_region(pci, 0, KBUILD_MODNAME);
+	if (IS_ERR(chip->mmio))
+		return PTR_ERR(chip->mmio);
 
 	chip->io = pci_resource_start(pci, 0);
-	chip->mmio = pcim_iomap_table(pci)[0];
 
 	/* Init audio core.
 	 * This must be done before we do request_irq otherwise we can get spurious
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 04/11] ALSA: aw2: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (2 preceding siblings ...)
  2025-04-04 12:19 ` [PATCH 03/11] ALSA: au88x0: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 05/11] ALSA: bt87x: " Philipp Stanner
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/aw2/aw2-alsa.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
index 29a4bcdec237..7b4b8f785517 100644
--- a/sound/pci/aw2/aw2-alsa.c
+++ b/sound/pci/aw2/aw2-alsa.c
@@ -225,11 +225,10 @@ static int snd_aw2_create(struct snd_card *card,
 	chip->irq = -1;
 
 	/* (1) PCI resource allocation */
-	err = pcim_iomap_regions(pci, 1 << 0, "Audiowerk2");
-	if (err < 0)
-		return err;
+	chip->iobase_virt = pcim_iomap_region(pci, 0, "Audiowerk2");
+	if (IS_ERR(chip->iobase_virt))
+		return PTR_ERR(chip->iobase_virt);
 	chip->iobase_phys = pci_resource_start(pci, 0);
-	chip->iobase_virt = pcim_iomap_table(pci)[0];
 
 	/* (2) initialization of the chip hardware */
 	snd_aw2_saa7146_setup(&chip->saa7146, chip->iobase_virt);
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 05/11] ALSA: bt87x: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (3 preceding siblings ...)
  2025-04-04 12:19 ` [PATCH 04/11] ALSA: aw2: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 06/11] ALSA: cs4281: " Philipp Stanner
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/bt87x.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index 621985bfee5d..91492dd2b38a 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -696,10 +696,9 @@ static int snd_bt87x_create(struct snd_card *card,
 	chip->irq = -1;
 	spin_lock_init(&chip->reg_lock);
 
-	err = pcim_iomap_regions(pci, 1 << 0, "Bt87x audio");
-	if (err < 0)
-		return err;
-	chip->mmio = pcim_iomap_table(pci)[0];
+	chip->mmio = pcim_iomap_region(pci, 0, "Bt87x audio");
+	if (IS_ERR(chip->mmio))
+		return PTR_ERR(chip->mmio);
 
 	chip->reg_control = CTL_A_PWRDN | CTL_DA_ES2 |
 			    CTL_PKTP_16 | (15 << CTL_DA_SDR_SHIFT);
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 06/11] ALSA: cs4281: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (4 preceding siblings ...)
  2025-04-04 12:19 ` [PATCH 05/11] ALSA: bt87x: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 07/11] ALSA: hda_intel: " Philipp Stanner
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/cs4281.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index 0cc86e73cc62..90958a422b75 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -1302,14 +1302,15 @@ static int snd_cs4281_create(struct snd_card *card,
 	}
 	chip->dual_codec = dual_codec;
 
-	err = pcim_iomap_regions(pci, 0x03, "CS4281"); /* 2 BARs */
-	if (err < 0)
-		return err;
+	chip->ba0 = pcim_iomap_region(pci, 0, "CS4281");
+	if (IS_ERR(chip->ba0))
+		return PTR_ERR(chip->ba0);
 	chip->ba0_addr = pci_resource_start(pci, 0);
-	chip->ba1_addr = pci_resource_start(pci, 1);
 
-	chip->ba0 = pcim_iomap_table(pci)[0];
-	chip->ba1 = pcim_iomap_table(pci)[1];
+	chip->ba1 = pcim_iomap_region(pci, 1, "CS4281");
+	if (IS_ERR(chip->ba1))
+		return PTR_ERR(chip->ba1);
+	chip->ba1_addr = pci_resource_start(pci, 1);
 	
 	if (devm_request_irq(&pci->dev, pci->irq, snd_cs4281_interrupt,
 			     IRQF_SHARED, KBUILD_MODNAME, chip)) {
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 07/11] ALSA: hda_intel: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (5 preceding siblings ...)
  2025-04-04 12:19 ` [PATCH 06/11] ALSA: cs4281: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 08/11] ALSA: cs5530: " Philipp Stanner
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/hda/hda_intel.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 512fb22f5e5e..9756017930b5 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1877,12 +1877,11 @@ static int azx_first_init(struct azx *chip)
 			chip->jackpoll_interval = msecs_to_jiffies(1500);
 	}
 
-	err = pcim_iomap_regions(pci, 1 << 0, "ICH HD audio");
-	if (err < 0)
-		return err;
+	bus->remap_addr = pcim_iomap_region(pci, 0, "ICH HD audio");
+	if (IS_ERR(bus->remap_addr))
+		return PTR_ERR(bus->remap_addr);
 
 	bus->addr = pci_resource_start(pci, 0);
-	bus->remap_addr = pcim_iomap_table(pci)[0];
 
 	if (chip->driver_type == AZX_DRIVER_SKL)
 		snd_hdac_bus_parse_capabilities(bus);
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 08/11] ALSA: cs5530: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (6 preceding siblings ...)
  2025-04-04 12:19 ` [PATCH 07/11] ALSA: hda_intel: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 09/11] ALSA: lola: " Philipp Stanner
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/cs5530.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c
index 93ff029e6583..532891e67c34 100644
--- a/sound/pci/cs5530.c
+++ b/sound/pci/cs5530.c
@@ -91,11 +91,10 @@ static int snd_cs5530_create(struct snd_card *card,
 	chip->card = card;
 	chip->pci = pci;
 
-	err = pcim_iomap_regions(pci, 1 << 0, "CS5530");
-	if (err < 0)
-		return err;
+	mem = pcim_iomap_region(pci, 0, "CS5530");
+	if (IS_ERR(mem))
+		return PTR_ERR(mem);
 	chip->pci_base = pci_resource_start(pci, 0);
-	mem = pcim_iomap_table(pci)[0];
 	map = readw(mem + 0x18);
 
 	/* Map bits
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 09/11] ALSA: lola: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (7 preceding siblings ...)
  2025-04-04 12:19 ` [PATCH 08/11] ALSA: cs5530: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 10/11] ALSA: hdspm: " Philipp Stanner
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/lola/lola.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c
index 1aa30e90b86a..fb8bd54e4c2d 100644
--- a/sound/pci/lola/lola.c
+++ b/sound/pci/lola/lola.c
@@ -541,6 +541,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci, int dev)
 	struct lola *chip = card->private_data;
 	int err;
 	unsigned int dever;
+	void __iomem *iomem;
 
 	err = pcim_enable_device(pci);
 	if (err < 0)
@@ -580,14 +581,19 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci, int dev)
 		chip->sample_rate_min = 16000;
 	}
 
-	err = pcim_iomap_regions(pci, (1 << 0) | (1 << 2), DRVNAME);
-	if (err < 0)
-		return err;
+	iomem = pcim_iomap_region(pci, 0, DRVNAME);
+	if (IS_ERR(iomem))
+		return PTR_ERR(iomem);
 
+	chip->bar[0].remap_addr = iomem;
 	chip->bar[0].addr = pci_resource_start(pci, 0);
-	chip->bar[0].remap_addr = pcim_iomap_table(pci)[0];
+
+	iomem = pcim_iomap_region(pci, 2, DRVNAME);
+	if (IS_ERR(iomem))
+		return PTR_ERR(iomem);
+
+	chip->bar[1].remap_addr = iomem;
 	chip->bar[1].addr = pci_resource_start(pci, 2);
-	chip->bar[1].remap_addr = pcim_iomap_table(pci)[2];
 
 	pci_set_master(pci);
 
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 10/11] ALSA: hdspm: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (8 preceding siblings ...)
  2025-04-04 12:19 ` [PATCH 09/11] ALSA: lola: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 12:19 ` [PATCH 11/11] ASoC: loongson: " Philipp Stanner
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/pci/rme9652/hdspm.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index f89718b19d23..9e11e60284eb 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -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);
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 11/11] ASoC: loongson: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (9 preceding siblings ...)
  2025-04-04 12:19 ` [PATCH 10/11] ALSA: hdspm: " Philipp Stanner
@ 2025-04-04 12:19 ` Philipp Stanner
  2025-04-04 13:47 ` [PATCH 00/11] sound: " Takashi Iwai
  2025-04-07 23:35 ` (subset) " Mark Brown
  12 siblings, 0 replies; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 12:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Philipp Stanner, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin
  Cc: linux-parisc, linux-sound, linux-kernel

pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Replace them with pcim_iomap_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 sound/soc/loongson/loongson_i2s_pci.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sound/soc/loongson/loongson_i2s_pci.c b/sound/soc/loongson/loongson_i2s_pci.c
index d2d0e5d8cac9..1ea5501a97f8 100644
--- a/sound/soc/loongson/loongson_i2s_pci.c
+++ b/sound/soc/loongson/loongson_i2s_pci.c
@@ -16,6 +16,8 @@
 #include "loongson_i2s.h"
 #include "loongson_dma.h"
 
+#define DRIVER_NAME "loongson-i2s-pci"
+
 static bool loongson_i2s_wr_reg(struct device *dev, unsigned int reg)
 {
 	switch (reg) {
@@ -92,13 +94,12 @@ static int loongson_i2s_pci_probe(struct pci_dev *pdev,
 	i2s->dev = dev;
 	pci_set_drvdata(pdev, i2s);
 
-	ret = pcim_iomap_regions(pdev, 1 << 0, dev_name(dev));
-	if (ret < 0) {
-		dev_err(dev, "iomap_regions failed\n");
-		return ret;
+	i2s->reg_base = pcim_iomap_region(pdev, 0, DRIVER_NAME);
+	if (IS_ERR(i2s->reg_base)) {
+		dev_err(dev, "iomap_region failed\n");
+		return PTR_ERR(i2s->reg_base);
 	}
 
-	i2s->reg_base = pcim_iomap_table(pdev)[0];
 	i2s->regmap = devm_regmap_init_mmio(dev, i2s->reg_base,
 					    &loongson_i2s_regmap_config);
 	if (IS_ERR(i2s->regmap))
@@ -147,7 +148,7 @@ static const struct pci_device_id loongson_i2s_ids[] = {
 MODULE_DEVICE_TABLE(pci, loongson_i2s_ids);
 
 static struct pci_driver loongson_i2s_driver = {
-	.name = "loongson-i2s-pci",
+	.name = DRIVER_NAME,
 	.id_table = loongson_i2s_ids,
 	.probe = loongson_i2s_pci_probe,
 	.driver = {
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 00/11] sound: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (10 preceding siblings ...)
  2025-04-04 12:19 ` [PATCH 11/11] ASoC: loongson: " Philipp Stanner
@ 2025-04-04 13:47 ` Takashi Iwai
  2025-04-04 13:49   ` Philipp Stanner
  2025-04-07 23:35 ` (subset) " Mark Brown
  12 siblings, 1 reply; 18+ messages in thread
From: Takashi Iwai @ 2025-04-04 13:47 UTC (permalink / raw)
  To: Philipp Stanner
  Cc: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Pierre-Louis Bossart, Bard Liao,
	Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin, linux-parisc, linux-sound, linux-kernel

On Fri, 04 Apr 2025 14:19:01 +0200,
Philipp Stanner wrote:
> 
> pcim_iomap_table() and pcim_iomap_regions() have been deprecated by the
> PCI subsystem. In sound/, they can easily be replaced with
> pcim_iomap_region().
> 
> This series was around some time in late summer last year as a single
> patch. I lost track of it for a while, but Takashi Iwai (AFAIR)
> requested that I split it by component.
> 
> So that's being done here. Feel free to squash the patches as you like.

Thanks for the patches.  I suppose those are no urgent fixes, and can
be postponed for 6.16?  If so, I'll pick them up after 6.15-rc1 merge
window is closed.


Takashi

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 00/11] sound: Replace deprecated PCI functions
  2025-04-04 13:47 ` [PATCH 00/11] sound: " Takashi Iwai
@ 2025-04-04 13:49   ` Philipp Stanner
  2025-04-07  7:24     ` Takashi Iwai
  0 siblings, 1 reply; 18+ messages in thread
From: Philipp Stanner @ 2025-04-04 13:49 UTC (permalink / raw)
  To: Takashi Iwai, Philipp Stanner
  Cc: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Mark Brown, Thorsten Blum, Pierre-Louis Bossart, Bard Liao,
	Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin, linux-parisc, linux-sound, linux-kernel

On Fri, 2025-04-04 at 15:47 +0200, Takashi Iwai wrote:
> On Fri, 04 Apr 2025 14:19:01 +0200,
> Philipp Stanner wrote:
> > 
> > pcim_iomap_table() and pcim_iomap_regions() have been deprecated by
> > the
> > PCI subsystem. In sound/, they can easily be replaced with
> > pcim_iomap_region().
> > 
> > This series was around some time in late summer last year as a
> > single
> > patch. I lost track of it for a while, but Takashi Iwai (AFAIR)
> > requested that I split it by component.
> > 
> > So that's being done here. Feel free to squash the patches as you
> > like.
> 
> Thanks for the patches.  I suppose those are no urgent fixes, and can
> be postponed for 6.16?  If so, I'll pick them up after 6.15-rc1 merge
> window is closed.

Sure, those are just improvements that aren't urgent.

Thx,
P.

> 
> 
> Takashi


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 00/11] sound: Replace deprecated PCI functions
  2025-04-04 13:49   ` Philipp Stanner
@ 2025-04-07  7:24     ` Takashi Iwai
  0 siblings, 0 replies; 18+ messages in thread
From: Takashi Iwai @ 2025-04-07  7:24 UTC (permalink / raw)
  To: phasta, Philipp Stanner
  Cc: Takashi Iwai, Jaroslav Kysela, Takashi Iwai, Clemens Ladisch,
	Liam Girdwood, Mark Brown, Thorsten Blum, Pierre-Louis Bossart,
	Bard Liao, Peter Ujfalusi, Heiner Kallweit, Maxim Mikityanskiy,
	Kuninori Morimoto, He Lugang, Jerome Brunet, Binbin Zhou,
	Tang Bin, linux-parisc, linux-sound, linux-kernel

On Fri, 04 Apr 2025 15:49:36 +0200,
Philipp Stanner wrote:
> 
> On Fri, 2025-04-04 at 15:47 +0200, Takashi Iwai wrote:
> > On Fri, 04 Apr 2025 14:19:01 +0200,
> > Philipp Stanner wrote:
> > > 
> > > pcim_iomap_table() and pcim_iomap_regions() have been deprecated by
> > > the
> > > PCI subsystem. In sound/, they can easily be replaced with
> > > pcim_iomap_region().
> > > 
> > > This series was around some time in late summer last year as a
> > > single
> > > patch. I lost track of it for a while, but Takashi Iwai (AFAIR)
> > > requested that I split it by component.
> > > 
> > > So that's being done here. Feel free to squash the patches as you
> > > like.
> > 
> > Thanks for the patches.  I suppose those are no urgent fixes, and can
> > be postponed for 6.16?  If so, I'll pick them up after 6.15-rc1 merge
> > window is closed.
> 
> Sure, those are just improvements that aren't urgent.

Now all patches applied to for-next branch.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: (subset) [PATCH 00/11] sound: Replace deprecated PCI functions
  2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
                   ` (11 preceding siblings ...)
  2025-04-04 13:47 ` [PATCH 00/11] sound: " Takashi Iwai
@ 2025-04-07 23:35 ` Mark Brown
  2025-04-08  5:22   ` Takashi Iwai
  12 siblings, 1 reply; 18+ messages in thread
From: Mark Brown @ 2025-04-07 23:35 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Thorsten Blum, Pierre-Louis Bossart, Bard Liao, Peter Ujfalusi,
	Heiner Kallweit, Maxim Mikityanskiy, Kuninori Morimoto, He Lugang,
	Jerome Brunet, Binbin Zhou, Tang Bin, Philipp Stanner
  Cc: linux-parisc, linux-sound, linux-kernel

On Fri, 04 Apr 2025 14:19:01 +0200, Philipp Stanner wrote:
> pcim_iomap_table() and pcim_iomap_regions() have been deprecated by the
> PCI subsystem. In sound/, they can easily be replaced with
> pcim_iomap_region().
> 
> This series was around some time in late summer last year as a single
> patch. I lost track of it for a while, but Takashi Iwai (AFAIR)
> requested that I split it by component.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[11/11] ASoC: loongson: Replace deprecated PCI functions
        commit: 7288aa73e5cfb3f37ae93b55d7b7d63eca5140a8

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: (subset) [PATCH 00/11] sound: Replace deprecated PCI functions
  2025-04-07 23:35 ` (subset) " Mark Brown
@ 2025-04-08  5:22   ` Takashi Iwai
  2025-04-08  9:26     ` Mark Brown
  0 siblings, 1 reply; 18+ messages in thread
From: Takashi Iwai @ 2025-04-08  5:22 UTC (permalink / raw)
  To: Mark Brown
  Cc: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Thorsten Blum, Pierre-Louis Bossart, Bard Liao, Peter Ujfalusi,
	Heiner Kallweit, Maxim Mikityanskiy, Kuninori Morimoto, He Lugang,
	Jerome Brunet, Binbin Zhou, Tang Bin, Philipp Stanner,
	linux-parisc, linux-sound, linux-kernel

On Tue, 08 Apr 2025 01:35:54 +0200,
Mark Brown wrote:
> 
> On Fri, 04 Apr 2025 14:19:01 +0200, Philipp Stanner wrote:
> > pcim_iomap_table() and pcim_iomap_regions() have been deprecated by the
> > PCI subsystem. In sound/, they can easily be replaced with
> > pcim_iomap_region().
> > 
> > This series was around some time in late summer last year as a single
> > patch. I lost track of it for a while, but Takashi Iwai (AFAIR)
> > requested that I split it by component.
> > 
> > [...]
> 
> Applied to
> 
>    https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
> 
> Thanks!
> 
> [11/11] ASoC: loongson: Replace deprecated PCI functions
>         commit: 7288aa73e5cfb3f37ae93b55d7b7d63eca5140a8
> 
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
> 
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
> 
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
> 
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.

Oh, I already applied this one blindly as a part of series to my
tree.  But it's a trivial fix and shouldn't be a big problem to apply
twice...


Takashi

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: (subset) [PATCH 00/11] sound: Replace deprecated PCI functions
  2025-04-08  5:22   ` Takashi Iwai
@ 2025-04-08  9:26     ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2025-04-08  9:26 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Jaroslav Kysela, Takashi Iwai, Clemens Ladisch, Liam Girdwood,
	Thorsten Blum, Pierre-Louis Bossart, Bard Liao, Peter Ujfalusi,
	Heiner Kallweit, Maxim Mikityanskiy, Kuninori Morimoto, He Lugang,
	Jerome Brunet, Binbin Zhou, Tang Bin, Philipp Stanner,
	linux-parisc, linux-sound, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

On Tue, Apr 08, 2025 at 07:22:54AM +0200, Takashi Iwai wrote:
> Mark Brown wrote:

> > [11/11] ASoC: loongson: Replace deprecated PCI functions
> >         commit: 7288aa73e5cfb3f37ae93b55d7b7d63eca5140a8

> Oh, I already applied this one blindly as a part of series to my
> tree.  But it's a trivial fix and shouldn't be a big problem to apply
> twice...

Yeah, I saw you applied it after it was already well down the pipeline
in a branch in my CI and thought it'd be fine if we ended up with two
copies.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-04-08  9:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 12:19 [PATCH 00/11] sound: Replace deprecated PCI functions Philipp Stanner
2025-04-04 12:19 ` [PATCH 01/11] ALSA: ad1889: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 02/11] ALSA: atiixp: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 03/11] ALSA: au88x0: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 04/11] ALSA: aw2: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 05/11] ALSA: bt87x: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 06/11] ALSA: cs4281: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 07/11] ALSA: hda_intel: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 08/11] ALSA: cs5530: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 09/11] ALSA: lola: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 10/11] ALSA: hdspm: " Philipp Stanner
2025-04-04 12:19 ` [PATCH 11/11] ASoC: loongson: " Philipp Stanner
2025-04-04 13:47 ` [PATCH 00/11] sound: " Takashi Iwai
2025-04-04 13:49   ` Philipp Stanner
2025-04-07  7:24     ` Takashi Iwai
2025-04-07 23:35 ` (subset) " Mark Brown
2025-04-08  5:22   ` Takashi Iwai
2025-04-08  9:26     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).