ALSA: Phase out hybrid PCI devres API
Subsystems (3)
v2 cover ALSA: Phase out hybrid PCI devres API
Changes in v2:
- Add RB from Andy
- Remove ASoC patches, branch out this series for Alsa. (Andy)
Hi,
a year ago we spent quite some work trying to get PCI into better shape. Some pci_ functions can be sometimes managed with devres, which is obviously bad. We want to provide an obvious API, where pci_ functions are never, and pcim_ functions are always managed.
Thus, everyone enabling his device with pcim_enable_device() must be ported to pcim_ functions. Porting all users will later enable us to significantly simplify parts of the PCI subsystem. See here [1] for details.
This patch series does that for sound.
Feel free to squash the commits as you see fit.
P.
[1] https://elixir.bootlin.com/linux/v6.14-rc4/source/drivers/pci/devres.c#L18
Philipp Stanner (28):
ALSA: sonicvibes: Use pure devres PCI
ALSA: rme96: Use pure devres PCI
ALSA: rme32: Use pure devres PCI
ALSA: ens1370: Use pure devres PCI
ALSA: cmipci: Use pure devres PCI
ALSA: via82: Use pure devres PCI
ALSA: sis7019: Use pure devres PCI
ALSA: intel8x: Use pure devres PCI
ALSA: fm801: Use pure devres PCI
ALSA: es19x8: Use pure devres PCI
ALSA: azt3328: Use pure devres PCI
ALSA: als: Use pure devres PCI
ALSA: oxygen: Use pure devres PCI
ALSA: lx6464es: Use pure devres PCI
ALSA: vx222: Use pure devres PCI
ALSA: trident: Use pure devres PCI
ALSA: rme9652: Use pure devres PCI
ALSA: ymfpci: Use pure devres PCI
ALSA: riptide: Use pure devres PCI
ALSA: nm256: Use pure devres PCI
ALSA: ice: Use pure devres PCI
ALSA: emu10k1: Use pure devres PCI
ALSA: echoaudio: Use pure devres PCI
ALSA: cs5535: Use pure devres PCI
ALSA: cs46xx: Use pure devres PCI
ALSA: ca0106: Use pure devres PCI
ALSA: ali5451: Use pure devres PCI
ALSA: maestro3: Use pure devres PCI
sound/pci/ali5451/ali5451.c | 2 +- sound/pci/als300.c | 2 +- sound/pci/als4000.c | 2 +- sound/pci/azt3328.c | 2 +- sound/pci/ca0106/ca0106_main.c | 2 +- sound/pci/cmipci.c | 2 +- sound/pci/cs46xx/cs46xx_lib.c | 2 +- sound/pci/cs5535audio/cs5535audio.c | 2 +- sound/pci/echoaudio/echoaudio.c | 2 +- sound/pci/emu10k1/emu10k1_main.c | 2 +- sound/pci/emu10k1/emu10k1x.c | 2 +- sound/pci/ens1370.c | 2 +- sound/pci/es1938.c | 2 +- sound/pci/es1968.c | 2 +- sound/pci/fm801.c | 2 +- sound/pci/ice1712/ice1712.c | 2 +- sound/pci/ice1712/ice1724.c | 2 +- sound/pci/intel8x0.c | 2 +- sound/pci/intel8x0m.c | 2 +- sound/pci/lx6464es/lx6464es.c | 2 +- sound/pci/maestro3.c | 2 +- sound/pci/nm256/nm256.c | 2 +- sound/pci/oxygen/oxygen_lib.c | 2 +- sound/pci/riptide/riptide.c | 2 +- sound/pci/rme32.c | 2 +- sound/pci/rme96.c | 2 +- sound/pci/rme9652/hdsp.c | 2 +- sound/pci/rme9652/rme9652.c | 2 +- sound/pci/sis7019.c | 2 +- sound/pci/sonicvibes.c | 2 +- sound/pci/trident/trident_main.c | 2 +- sound/pci/via82xx.c | 2 +- sound/pci/via82xx_modem.c | 2 +- sound/pci/vx222/vx222.c | 2 +- sound/pci/ymfpci/ymfpci_main.c | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-)
Signature · 1 line
2.48.1
PATCH v2 1/28 ALSA: sonicvibes: Use pure devres PCI
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().
--- sound/pci/sonicvibes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/sonicvibes.c +1 -1
@@ -1227,7 +1227,7 @@ static int snd_sonicvibes_create(struct snd_card *card, sonic->pci = pci; sonic->irq =-1 ; - err =pci_request_regions (pci,"S3 SonicVibes" ); + err =pcim_request_all_regions (pci,"S3 SonicVibes" );if (err <0 )return err;
Signature · 1 line
2.48.1
PATCH v2 2/28 ALSA: rme96: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/rme96.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/rme96.c +1 -1
@@ -1575,7 +1575,7 @@ snd_rme96_create(struct rme96 *rme96)if (err <0 )return err; - err =pci_request_regions (pci,"RME96" ); + err =pcim_request_all_regions (pci,"RME96" );if (err <0 )return err; rme96->port =pci_resource_start (rme96->pci,0 );
Signature · 1 line
2.48.1
PATCH v2 3/28 ALSA: rme32: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/rme32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/rme32.c +1 -1
@@ -1284,7 +1284,7 @@ static int snd_rme32_create(struct rme32 *rme32)if (err <0 )return err; - err =pci_request_regions (pci,"RME32" ); + err =pcim_request_all_regions (pci,"RME32" );if (err <0 )return err; rme32->port =pci_resource_start (rme32->pci,0 );
Signature · 1 line
2.48.1
PATCH v2 4/28 ALSA: ens1370: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/ens1370.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/ens1370.c +1 -1
@@ -2022,7 +2022,7 @@ static int snd_ensoniq_create(struct snd_card *card, ensoniq->card = card; ensoniq->pci = pci; ensoniq->irq =-1 ; - err =pci_request_regions (pci,"Ensoniq AudioPCI" ); + err =pcim_request_all_regions (pci,"Ensoniq AudioPCI" );if (err <0 )return err; ensoniq->port =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 5/28 ALSA: cmipci: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/cmipci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/cmipci.c +1 -1
@@ -2980,7 +2980,7 @@ static int snd_cmipci_create(struct snd_card *card, struct pci_dev *pci, cm->channel[1 ].ch =1 ; cm->channel[0 ].is_dac = cm->channel[1 ].is_dac =1 ;/* dual DAC mode */ - err =pci_request_regions (pci, card->driver); + err =pcim_request_all_regions (pci, card->driver);if (err <0 )return err; cm->iobase =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 6/28 ALSA: via82: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/via82xx.c | 2 +- sound/pci/via82xx_modem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/via82xx.c +1 -1
@@ -2326,7 +2326,7 @@ static int snd_via82xx_create(struct snd_card *card,pci_write_config_byte (chip->pci,VIA_FUNC_ENABLE , chip->old_legacy & ~(VIA_FUNC_ENABLE_SB |VIA_FUNC_ENABLE_FM )); - err =pci_request_regions (pci, card->driver); + err =pcim_request_all_regions (pci, card->driver);if (err <0 )return err; chip->port =pci_resource_start (pci,0 );
sound/pci/via82xx_modem.c +1 -1
@@ -1071,7 +1071,7 @@ static int snd_via82xx_create(struct snd_card *card, chip->pci = pci; chip->irq =-1 ; - err =pci_request_regions (pci, card->driver); + err =pcim_request_all_regions (pci, card->driver);if (err <0 )return err; chip->port =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 7/28 ALSA: sis7019: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/sis7019.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/sis7019.c +1 -1
@@ -1273,7 +1273,7 @@ static int sis_chip_create(struct snd_card *card, sis->irq =-1 ; sis->ioport =pci_resource_start (pci,0 ); - rc =pci_request_regions (pci,"SiS7019" ); + rc =pcim_request_all_regions (pci,"SiS7019" );if (rc) {dev_err (&pci->dev,"unable request regions\n" );return rc;
Signature · 1 line
2.48.1
PATCH v2 8/28 ALSA: intel8x: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/intel8x0.c | 2 +- sound/pci/intel8x0m.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/intel8x0.c +1 -1
@@ -2926,7 +2926,7 @@ static int snd_intel8x0_init(struct snd_card *card, pci->device == PCI_DEVICE_ID_INTEL_440MX) chip->fix_nocache = 1; /* enable workaround */ - err =pci_request_regions (pci, card->shortname); + err =pcim_request_all_regions (pci, card->shortname);if (err <0 )return err;
sound/pci/intel8x0m.c +1 -1
@@ -1060,7 +1060,7 @@ static int snd_intel8x0m_init(struct snd_card *card, chip->pci = pci; chip->irq =-1 ; - err =pci_request_regions (pci, card->shortname); + err =pcim_request_all_regions (pci, card->shortname);if (err <0 )return err;
Signature · 1 line
2.48.1
PATCH v2 9/28 ALSA: fm801: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/fm801.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/fm801.c +1 -1
@@ -1191,7 +1191,7 @@ static int snd_fm801_create(struct snd_card *card, chip->dev = &pci->dev; chip->irq =-1 ; chip->tea575x_tuner = tea575x_tuner; - err =pci_request_regions (pci,"FM801" ); + err =pcim_request_all_regions (pci,"FM801" );if (err <0 )return err; chip->port =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 10/28 ALSA: es19x8: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/es1938.c | 2 +- sound/pci/es1968.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/es1938.c +1 -1
@@ -1531,7 +1531,7 @@ static int snd_es1938_create(struct snd_card *card, chip->card = card; chip->pci = pci; chip->irq =-1 ; - err =pci_request_regions (pci,"ESS Solo-1" ); + err =pcim_request_all_regions (pci,"ESS Solo-1" );if (err <0 )return err; chip->io_port =pci_resource_start (pci,0 );
sound/pci/es1968.c +1 -1
@@ -2647,7 +2647,7 @@ static int snd_es1968_create(struct snd_card *card, chip->playback_streams = play_streams; chip->capture_streams = capt_streams; - err =pci_request_regions (pci,"ESS Maestro" ); + err =pcim_request_all_regions (pci,"ESS Maestro" );if (err <0 )return err; chip->io_port =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 11/28 ALSA: azt3328: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/azt3328.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/azt3328.c +1 -1
@@ -2347,7 +2347,7 @@ snd_azf3328_create(struct snd_card *card,return -ENXIO ; } - err =pci_request_regions (pci,"Aztech AZF3328" ); + err =pcim_request_all_regions (pci,"Aztech AZF3328" );if (err <0 )return err;
Signature · 1 line
2.48.1
PATCH v2 12/28 ALSA: als: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/als300.c | 2 +- sound/pci/als4000.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/als300.c +1 -1
@@ -617,7 +617,7 @@ static int snd_als300_create(struct snd_card *card, chip->chip_type = chip_type;spin_lock_init (&chip->reg_lock); - err =pci_request_regions (pci,"ALS300" ); + err =pcim_request_all_regions (pci,"ALS300" );if (err <0 )return err;
sound/pci/als4000.c +1 -1
@@ -836,7 +836,7 @@ static int __snd_card_als4000_probe(struct pci_dev *pci,return -ENXIO ; } - err =pci_request_regions (pci,"ALS4000" ); + err =pcim_request_all_regions (pci,"ALS4000" );if (err <0 )return err; iobase =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 13/28 ALSA: oxygen: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/oxygen/oxygen_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/oxygen/oxygen_lib.c +1 -1
@@ -609,7 +609,7 @@ static int __oxygen_pci_probe(struct pci_dev *pci, int index, char *id,if (err <0 )return err; - err =pci_request_regions (pci,DRIVER ); + err =pcim_request_all_regions (pci,DRIVER );if (err <0 ) {dev_err (card->dev,"cannot reserve PCI resources\n" );return err;
Signature · 1 line
2.48.1
PATCH v2 14/28 ALSA: lx6464es: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/lx6464es/lx6464es.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/lx6464es/lx6464es.c +1 -1
@@ -944,7 +944,7 @@ static int snd_lx6464es_create(struct snd_card *card,mutex_init (&chip->setup_mutex);/* request resources */ - err =pci_request_regions (pci, card_name); + err =pcim_request_all_regions (pci, card_name);if (err <0 )return err;
Signature · 1 line
2.48.1
PATCH v2 15/28 ALSA: vx222: Use pure devres PCI
In reply to Philipp Stannerpci_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().
Pass the driver's name as the name parameter ofpcim_request_all_regions().
--- sound/pci/vx222/vx222.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/vx222/vx222.c +1 -1
@@ -123,7 +123,7 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci, vx =to_vx222 (chip); vx->pci = pci; - err =pci_request_regions (pci,CARD_NAME ); + err =pcim_request_all_regions (pci,KBUILD_MODNAME );if (err <0 )return err;for (i =0 ; i <2 ; i++)
Signature · 1 line
2.48.1
PATCH v2 16/28 ALSA: trident: Use pure devres PCI
In reply to Philipp Stannerpci_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.
In addition, the request function's name parameter should describe the driver, not the device.
Replace pci_request_regions() with the always-managed function pcim_request_all_regions().
--- sound/pci/trident/trident_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/trident/trident_main.c +1 -1
@@ -3533,7 +3533,7 @@ int snd_trident_create(struct snd_card *card, trident->midi_port =TRID_REG (trident,T4D_MPU401_BASE );pci_set_master (pci); - err =pci_request_regions (pci,"Trident Audio" ); + err =pcim_request_all_regions (pci,"Trident Audio" );if (err <0 )return err; trident->port =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 17/28 ALSA: rme9652: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/rme9652/hdsp.c | 2 +- sound/pci/rme9652/rme9652.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/rme9652/hdsp.c +1 -1
@@ -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 );
sound/pci/rme9652/rme9652.c +1 -1
@@ -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 );
Signature · 1 line
2.48.1
PATCH v2 18/28 ALSA: ymfpci: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/ymfpci/ymfpci_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/ymfpci/ymfpci_main.c +1 -1
@@ -2307,7 +2307,7 @@ int snd_ymfpci_create(struct snd_card *card, chip->device_id = pci->device; chip->rev = pci->revision; - err =pci_request_regions (pci,"YMFPCI" ); + err =pcim_request_all_regions (pci,"YMFPCI" );if (err <0 )return err;
Signature · 1 line
2.48.1
PATCH v2 19/28 ALSA: riptide: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/riptide/riptide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/riptide/riptide.c +1 -1
@@ -1831,7 +1831,7 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci) chip->cif =NULL ; card->private_free = snd_riptide_free; - err =pci_request_regions (pci,"RIPTIDE" ); + err =pcim_request_all_regions (pci,"RIPTIDE" );if (err <0 )return err; hwport = (struct riptideport *)chip->port;
Signature · 1 line
2.48.1
PATCH v2 20/28 ALSA: nm256: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/nm256/nm256.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/nm256/nm256.c +1 -1
@@ -1447,7 +1447,7 @@ snd_nm256_create(struct snd_card *card, struct pci_dev *pci) chip->buffer_addr =pci_resource_start (pci,0 ); chip->cport_addr =pci_resource_start (pci,1 ); - err =pci_request_regions (pci, card->driver); + err =pcim_request_all_regions (pci, card->driver);if (err <0 )return err;
Signature · 1 line
2.48.1
PATCH v2 21/28 ALSA: ice: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/ice1712/ice1712.c | 2 +- sound/pci/ice1712/ice1724.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/ice1712/ice1712.c +1 -1
@@ -2502,7 +2502,7 @@ static int snd_ice1712_create(struct snd_card *card,pci_write_config_word (ice->pci,0x42 ,0x0006 );snd_ice1712_proc_init (ice); - err =pci_request_regions (pci,"ICE1712" ); + err =pcim_request_all_regions (pci,"ICE1712" );if (err <0 )return err; ice->port =pci_resource_start (pci,0 );
sound/pci/ice1712/ice1724.c +1 -1
@@ -2491,7 +2491,7 @@ static int snd_vt1724_create(struct snd_card *card,pci_set_master (pci);snd_vt1724_proc_init (ice); - err =pci_request_regions (pci,"ICE1724" ); + err =pcim_request_all_regions (pci,"ICE1724" );if (err <0 )return err; ice->port =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 22/28 ALSA: emu10k1: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/emu10k1/emu10k1_main.c | 2 +- sound/pci/emu10k1/emu10k1x.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/emu10k1/emu10k1_main.c +1 -1
@@ -1563,7 +1563,7 @@ int snd_emu10k1_create(struct snd_card *card,else emu->gpr_base =FXGPREGBASE ; - err =pci_request_regions (pci,"EMU10K1" ); + err =pcim_request_all_regions (pci,"EMU10K1" );if (err <0 )return err; emu->port =pci_resource_start (pci,0 );
sound/pci/emu10k1/emu10k1x.c +1 -1
@@ -884,7 +884,7 @@ static int snd_emu10k1x_create(struct snd_card *card,spin_lock_init (&chip->emu_lock);spin_lock_init (&chip->voice_lock); - err =pci_request_regions (pci,"EMU10K1X" ); + err =pcim_request_all_regions (pci,"EMU10K1X" );if (err <0 )return err; chip->port =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 23/28 ALSA: echoaudio: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/echoaudio/echoaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/echoaudio/echoaudio.c +1 -1
@@ -1910,7 +1910,7 @@ static int snd_echo_create(struct snd_card *card, chip->can_set_rate =1 ;/* PCI resource allocation */ - err =pci_request_regions (pci,ECHOCARD_NAME ); + err =pcim_request_all_regions (pci,ECHOCARD_NAME );if (err <0 )return err;
Signature · 1 line
2.48.1
PATCH v2 24/28 ALSA: cs5535: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/cs5535audio/cs5535audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/cs5535audio/cs5535audio.c +1 -1
@@ -262,7 +262,7 @@ static int snd_cs5535audio_create(struct snd_card *card, cs5535au->pci = pci; cs5535au->irq =-1 ; - err =pci_request_regions (pci,"CS5535 Audio" ); + err =pcim_request_all_regions (pci,"CS5535 Audio" );if (err <0 )return err;
Signature · 1 line
2.48.1
PATCH v2 25/28 ALSA: cs46xx: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/cs46xx/cs46xx_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/cs46xx/cs46xx_lib.c +1 -1
@@ -3839,7 +3839,7 @@ int snd_cs46xx_create(struct snd_card *card, chip->pci = pci; chip->irq =-1 ; - err =pci_request_regions (pci,"CS46xx" ); + err =pcim_request_all_regions (pci,"CS46xx" );if (err <0 )return err; chip->ba0_addr =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 26/28 ALSA: ca0106: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/ca0106/ca0106_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/ca0106/ca0106_main.c +1 -1
@@ -1593,7 +1593,7 @@ static int snd_ca0106_create(int dev, struct snd_card *card,spin_lock_init (&chip->emu_lock); - err =pci_request_regions (pci,"snd_ca0106" ); + err =pcim_request_all_regions (pci,"snd_ca0106" );if (err <0 )return err; chip->port =pci_resource_start (pci,0 );
Signature · 1 line
2.48.1
PATCH v2 27/28 ALSA: ali5451: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/ali5451/ali5451.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/ali5451/ali5451.c +1 -1
@@ -1989,7 +1989,7 @@ static int snd_ali_resources(struct snd_ali *codec)int err;dev_dbg (codec->card->dev,"resources allocation ...\n" ); - err =pci_request_regions (codec->pci,"ALI 5451" ); + err =pcim_request_all_regions (codec->pci,"ALI 5451" );if (err <0 )return err; codec->port =pci_resource_start (codec->pci,0 );
Signature · 1 line
2.48.1
PATCH v2 28/28 ALSA: maestro3: Use pure devres PCI
In reply to Philipp Stannerpci_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().
--- sound/pci/maestro3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/maestro3.c +1 -1
@@ -2552,7 +2552,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,if (err <0 )return err; - err =pci_request_regions (pci, card->driver); + err =pcim_request_all_regions (pci, card->driver);if (err <0 )return err;
Signature · 1 line
2.48.1
Takashi Iwai
AppliedQuoted 46 lines · Philipp Stanner
Changes in v2:
- Add RB from Andy
- Remove ASoC patches, branch out this series for Alsa. (Andy)Hi,
a year ago we spent quite some work trying to get PCI into better shape. Some
pci_functions can be sometimes managed with devres, which is obviously bad. We want to provide an obvious API, wherepci_functions are never, andpcim_functions are always managed.Thus, everyone enabling his device with
pcim_enable_device()must be ported topcim_functions. Porting all users will later enable us to significantly simplify parts of the PCI subsystem. See here [1] for details.This patch series does that for sound.
Feel free to squash the commits as you see fit.
P.
[1] https://elixir.bootlin.com/linux/v6.14-rc4/source/drivers/pci/devres.c#L18
Philipp Stanner (28):
ALSA: sonicvibes: Use pure devres PCI
ALSA: rme96: Use pure devres PCI
ALSA: rme32: Use pure devres PCI
ALSA: ens1370: Use pure devres PCI
ALSA: cmipci: Use pure devres PCI
ALSA: via82: Use pure devres PCI
ALSA: sis7019: Use pure devres PCI
ALSA: intel8x: Use pure devres PCI
ALSA: fm801: Use pure devres PCI
ALSA: es19x8: Use pure devres PCI
ALSA: azt3328: Use pure devres PCI
ALSA: als: Use pure devres PCI
ALSA: oxygen: Use pure devres PCI
ALSA: lx6464es: Use pure devres PCI
ALSA: vx222: Use pure devres PCI
ALSA: trident: Use pure devres PCI
ALSA: rme9652: Use pure devres PCI
ALSA: ymfpci: Use pure devres PCI
ALSA: riptide: Use pure devres PCI
ALSA: nm256: Use pure devres PCI
Quoted 8 lines
ALSA: ice: Use pure devres PCI
ALSA: emu10k1: Use pure devres PCI
ALSA: echoaudio: Use pure devres PCI
ALSA: cs5535: Use pure devres PCI
ALSA: cs46xx: Use pure devres PCI
ALSA: ca0106: Use pure devres PCI
ALSA: ali5451: Use pure devres PCI
ALSA: maestro3: Use pure devres PCI
Applied to for-next branch now. Thanks.
Takashi