Browse Source

ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove

As drvdata is cleared to NULL at probe failure or at removal by the
driver core, we don't have to call pci_set_drvdata(pci, NULL) any
longer in each driver.

The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in
hda_intel.c.  Since this function itself releases the card instance,
we need to clear drvdata here as well, so that it won't be released
doubly in the remove callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
isee-imx_3.14.28.y
Takashi Iwai 8 years ago
parent
commit
20a24225d8
51 changed files with 0 additions and 53 deletions
  1. +0
    -1
      sound/pci/ad1889.c
  2. +0
    -1
      sound/pci/ali5451/ali5451.c
  3. +0
    -1
      sound/pci/als300.c
  4. +0
    -1
      sound/pci/als4000.c
  5. +0
    -1
      sound/pci/asihpi/hpioctl.c
  6. +0
    -1
      sound/pci/atiixp.c
  7. +0
    -1
      sound/pci/atiixp_modem.c
  8. +0
    -1
      sound/pci/au88x0/au88x0.c
  9. +0
    -1
      sound/pci/aw2/aw2-alsa.c
  10. +0
    -1
      sound/pci/azt3328.c
  11. +0
    -1
      sound/pci/bt87x.c
  12. +0
    -1
      sound/pci/ca0106/ca0106_main.c
  13. +0
    -1
      sound/pci/cmipci.c
  14. +0
    -1
      sound/pci/cs4281.c
  15. +0
    -1
      sound/pci/cs46xx/cs46xx.c
  16. +0
    -1
      sound/pci/cs5530.c
  17. +0
    -1
      sound/pci/cs5535audio/cs5535audio.c
  18. +0
    -1
      sound/pci/ctxfi/xfi.c
  19. +0
    -1
      sound/pci/echoaudio/echoaudio.c
  20. +0
    -1
      sound/pci/emu10k1/emu10k1.c
  21. +0
    -1
      sound/pci/emu10k1/emu10k1x.c
  22. +0
    -1
      sound/pci/ens1370.c
  23. +0
    -1
      sound/pci/es1938.c
  24. +0
    -1
      sound/pci/es1968.c
  25. +0
    -1
      sound/pci/fm801.c
  26. +0
    -2
      sound/pci/hda/hda_intel.c
  27. +0
    -1
      sound/pci/ice1712/ice1712.c
  28. +0
    -1
      sound/pci/ice1712/ice1724.c
  29. +0
    -1
      sound/pci/intel8x0.c
  30. +0
    -1
      sound/pci/intel8x0m.c
  31. +0
    -1
      sound/pci/korg1212/korg1212.c
  32. +0
    -1
      sound/pci/lola/lola.c
  33. +0
    -1
      sound/pci/lx6464es/lx6464es.c
  34. +0
    -1
      sound/pci/maestro3.c
  35. +0
    -1
      sound/pci/mixart/mixart.c
  36. +0
    -1
      sound/pci/nm256/nm256.c
  37. +0
    -1
      sound/pci/oxygen/oxygen_lib.c
  38. +0
    -1
      sound/pci/pcxhr/pcxhr.c
  39. +0
    -2
      sound/pci/riptide/riptide.c
  40. +0
    -1
      sound/pci/rme32.c
  41. +0
    -1
      sound/pci/rme96.c
  42. +0
    -1
      sound/pci/rme9652/hdsp.c
  43. +0
    -1
      sound/pci/rme9652/hdspm.c
  44. +0
    -1
      sound/pci/rme9652/rme9652.c
  45. +0
    -1
      sound/pci/sis7019.c
  46. +0
    -1
      sound/pci/sonicvibes.c
  47. +0
    -1
      sound/pci/trident/trident.c
  48. +0
    -1
      sound/pci/via82xx.c
  49. +0
    -1
      sound/pci/via82xx_modem.c
  50. +0
    -1
      sound/pci/vx222/vx222.c
  51. +0
    -1
      sound/pci/ymfpci/ymfpci.c

+ 0
- 1
sound/pci/ad1889.c View File

@ -1046,7 +1046,6 @@ static void
snd_ad1889_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static DEFINE_PCI_DEVICE_TABLE(snd_ad1889_ids) = {


+ 0
- 1
sound/pci/ali5451/ali5451.c View File

@ -2298,7 +2298,6 @@ static int snd_ali_probe(struct pci_dev *pci,
static void snd_ali_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver ali5451_driver = {


+ 0
- 1
sound/pci/als300.c View File

@ -282,7 +282,6 @@ static void snd_als300_remove(struct pci_dev *pci)
{
snd_als300_dbgcallenter();
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
snd_als300_dbgcallleave();
}


+ 0
- 1
sound/pci/als4000.c View File

@ -984,7 +984,6 @@ out:
static void snd_card_als4000_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
#ifdef CONFIG_PM_SLEEP


+ 0
- 1
sound/pci/asihpi/hpioctl.c View File

@ -445,7 +445,6 @@ void asihpi_adapter_remove(struct pci_dev *pci_dev)
if (pa->p_buffer)
vfree(pa->p_buffer);
pci_set_drvdata(pci_dev, NULL);
if (1)
dev_info(&pci_dev->dev,
"remove %04x:%04x,%04x:%04x,%04x, HPI index %d\n",


+ 0
- 1
sound/pci/atiixp.c View File

@ -1714,7 +1714,6 @@ static int snd_atiixp_probe(struct pci_dev *pci,
static void snd_atiixp_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver atiixp_driver = {


+ 0
- 1
sound/pci/atiixp_modem.c View File

@ -1334,7 +1334,6 @@ static int snd_atiixp_probe(struct pci_dev *pci,
static void snd_atiixp_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver atiixp_modem_driver = {


+ 0
- 1
sound/pci/au88x0/au88x0.c View File

@ -371,7 +371,6 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
static void snd_vortex_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
// pci_driver definition


+ 0
- 1
sound/pci/aw2/aw2-alsa.c View File

@ -392,7 +392,6 @@ static int snd_aw2_probe(struct pci_dev *pci,
static void snd_aw2_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
/* open callback */


+ 0
- 1
sound/pci/azt3328.c View File

@ -2725,7 +2725,6 @@ snd_azf3328_remove(struct pci_dev *pci)
{
snd_azf3328_dbgcallenter();
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
snd_azf3328_dbgcallleave();
}


+ 0
- 1
sound/pci/bt87x.c View File

@ -953,7 +953,6 @@ _error:
static void snd_bt87x_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
/* default entries for all Bt87x cards - it's not exported */


+ 0
- 1
sound/pci/ca0106/ca0106_main.c View File

@ -1896,7 +1896,6 @@ static int snd_ca0106_probe(struct pci_dev *pci,
static void snd_ca0106_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
#ifdef CONFIG_PM_SLEEP


+ 0
- 1
sound/pci/cmipci.c View File

@ -3317,7 +3317,6 @@ static int snd_cmipci_probe(struct pci_dev *pci,
static void snd_cmipci_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}


+ 0
- 1
sound/pci/cs4281.c View File

@ -1971,7 +1971,6 @@ static int snd_cs4281_probe(struct pci_dev *pci,
static void snd_cs4281_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
/*


+ 0
- 1
sound/pci/cs46xx/cs46xx.c View File

@ -158,7 +158,6 @@ static int snd_card_cs46xx_probe(struct pci_dev *pci,
static void snd_card_cs46xx_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver cs46xx_driver = {


+ 0
- 1
sound/pci/cs5530.c View File

@ -91,7 +91,6 @@ static int snd_cs5530_dev_free(struct snd_device *device)
static void snd_cs5530_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static u8 snd_cs5530_mixer_read(unsigned long io, u8 reg)


+ 0
- 1
sound/pci/cs5535audio/cs5535audio.c View File

@ -391,7 +391,6 @@ static void snd_cs5535audio_remove(struct pci_dev *pci)
{
olpc_quirks_cleanup();
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver cs5535audio_driver = {


+ 0
- 1
sound/pci/ctxfi/xfi.c View File

@ -122,7 +122,6 @@ error:
static void ct_card_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
#ifdef CONFIG_PM_SLEEP


+ 0
- 1
sound/pci/echoaudio/echoaudio.c View File

@ -2323,7 +2323,6 @@ static void snd_echo_remove(struct pci_dev *pci)
chip = pci_get_drvdata(pci);
if (chip)
snd_card_free(chip->card);
pci_set_drvdata(pci, NULL);
}


+ 0
- 1
sound/pci/emu10k1/emu10k1.c View File

@ -202,7 +202,6 @@ static int snd_card_emu10k1_probe(struct pci_dev *pci,
static void snd_card_emu10k1_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}


+ 0
- 1
sound/pci/emu10k1/emu10k1x.c View File

@ -1623,7 +1623,6 @@ static int snd_emu10k1x_probe(struct pci_dev *pci,
static void snd_emu10k1x_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
// PCI IDs


+ 0
- 1
sound/pci/ens1370.c View File

@ -2497,7 +2497,6 @@ static int snd_audiopci_probe(struct pci_dev *pci,
static void snd_audiopci_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver ens137x_driver = {


+ 0
- 1
sound/pci/es1938.c View File

@ -1881,7 +1881,6 @@ static int snd_es1938_probe(struct pci_dev *pci,
static void snd_es1938_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver es1938_driver = {


+ 0
- 1
sound/pci/es1968.c View File

@ -2909,7 +2909,6 @@ static int snd_es1968_probe(struct pci_dev *pci,
static void snd_es1968_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver es1968_driver = {


+ 0
- 1
sound/pci/fm801.c View File

@ -1370,7 +1370,6 @@ static int snd_card_fm801_probe(struct pci_dev *pci,
static void snd_card_fm801_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
#ifdef CONFIG_PM_SLEEP


+ 0
- 2
sound/pci/hda/hda_intel.c View File

@ -3764,7 +3764,6 @@ static int azx_probe(struct pci_dev *pci,
out_free:
snd_card_free(card);
pci_set_drvdata(pci, NULL);
return err;
}
@ -3834,7 +3833,6 @@ static void azx_remove(struct pci_dev *pci)
if (card)
snd_card_free(card);
pci_set_drvdata(pci, NULL);
}
/* PCI IDs */


+ 0
- 1
sound/pci/ice1712/ice1712.c View File

@ -2807,7 +2807,6 @@ static void snd_ice1712_remove(struct pci_dev *pci)
if (ice->card_info && ice->card_info->chip_exit)
ice->card_info->chip_exit(ice);
snd_card_free(card);
pci_set_drvdata(pci, NULL);
}
static struct pci_driver ice1712_driver = {


+ 0
- 1
sound/pci/ice1712/ice1724.c View File

@ -2800,7 +2800,6 @@ static void snd_vt1724_remove(struct pci_dev *pci)
if (ice->card_info && ice->card_info->chip_exit)
ice->card_info->chip_exit(ice);
snd_card_free(card);
pci_set_drvdata(pci, NULL);
}
#ifdef CONFIG_PM_SLEEP


+ 0
- 1
sound/pci/intel8x0.c View File

@ -3364,7 +3364,6 @@ static int snd_intel8x0_probe(struct pci_dev *pci,
static void snd_intel8x0_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver intel8x0_driver = {


+ 0
- 1
sound/pci/intel8x0m.c View File

@ -1328,7 +1328,6 @@ static int snd_intel8x0m_probe(struct pci_dev *pci,
static void snd_intel8x0m_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver intel8x0m_driver = {


+ 0
- 1
sound/pci/korg1212/korg1212.c View File

@ -2473,7 +2473,6 @@ snd_korg1212_probe(struct pci_dev *pci,
static void snd_korg1212_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver korg1212_driver = {


+ 0
- 1
sound/pci/lola/lola.c View File

@ -759,7 +759,6 @@ out_free:
static void lola_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
/* PCI IDs */


+ 0
- 1
sound/pci/lx6464es/lx6464es.c View File

@ -1139,7 +1139,6 @@ out_free:
static void snd_lx6464es_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}


+ 0
- 1
sound/pci/maestro3.c View File

@ -2775,7 +2775,6 @@ snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
static void snd_m3_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver m3_driver = {


+ 0
- 1
sound/pci/mixart/mixart.c View File

@ -1377,7 +1377,6 @@ static int snd_mixart_probe(struct pci_dev *pci,
static void snd_mixart_remove(struct pci_dev *pci)
{
snd_mixart_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver mixart_driver = {


+ 0
- 1
sound/pci/nm256/nm256.c View File

@ -1746,7 +1746,6 @@ static int snd_nm256_probe(struct pci_dev *pci,
static void snd_nm256_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}


+ 0
- 1
sound/pci/oxygen/oxygen_lib.c View File

@ -722,7 +722,6 @@ EXPORT_SYMBOL(oxygen_pci_probe);
void oxygen_pci_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
EXPORT_SYMBOL(oxygen_pci_remove);


+ 0
- 1
sound/pci/pcxhr/pcxhr.c View File

@ -1691,7 +1691,6 @@ static int pcxhr_probe(struct pci_dev *pci,
static void pcxhr_remove(struct pci_dev *pci)
{
pcxhr_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver pcxhr_driver = {


+ 0
- 2
sound/pci/riptide/riptide.c View File

@ -2066,7 +2066,6 @@ static void snd_riptide_joystick_remove(struct pci_dev *pci)
if (gameport) {
release_region(gameport->io, 8);
gameport_unregister_port(gameport);
pci_set_drvdata(pci, NULL);
}
}
#endif
@ -2179,7 +2178,6 @@ snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
static void snd_card_riptide_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver driver = {


+ 0
- 1
sound/pci/rme32.c View File

@ -1981,7 +1981,6 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
static void snd_rme32_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver rme32_driver = {


+ 0
- 1
sound/pci/rme96.c View File

@ -2390,7 +2390,6 @@ snd_rme96_probe(struct pci_dev *pci,
static void snd_rme96_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver rme96_driver = {


+ 0
- 1
sound/pci/rme9652/hdsp.c View File

@ -5412,7 +5412,6 @@ static int snd_hdsp_probe(struct pci_dev *pci,
static void snd_hdsp_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver hdsp_driver = {


+ 0
- 1
sound/pci/rme9652/hdspm.c View File

@ -6737,7 +6737,6 @@ static int snd_hdspm_probe(struct pci_dev *pci,
static void snd_hdspm_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver hdspm_driver = {


+ 0
- 1
sound/pci/rme9652/rme9652.c View File

@ -2628,7 +2628,6 @@ static int snd_rme9652_probe(struct pci_dev *pci,
static void snd_rme9652_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver rme9652_driver = {


+ 0
- 1
sound/pci/sis7019.c View File

@ -1481,7 +1481,6 @@ error_out:
static void snd_sis7019_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver sis7019_driver = {


+ 0
- 1
sound/pci/sonicvibes.c View File

@ -1528,7 +1528,6 @@ static int snd_sonic_probe(struct pci_dev *pci,
static void snd_sonic_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver sonicvibes_driver = {


+ 0
- 1
sound/pci/trident/trident.c View File

@ -169,7 +169,6 @@ static int snd_trident_probe(struct pci_dev *pci,
static void snd_trident_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver trident_driver = {


+ 0
- 1
sound/pci/via82xx.c View File

@ -2646,7 +2646,6 @@ static int snd_via82xx_probe(struct pci_dev *pci,
static void snd_via82xx_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver via82xx_driver = {


+ 0
- 1
sound/pci/via82xx_modem.c View File

@ -1227,7 +1227,6 @@ static int snd_via82xx_probe(struct pci_dev *pci,
static void snd_via82xx_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver via82xx_modem_driver = {


+ 0
- 1
sound/pci/vx222/vx222.c View File

@ -254,7 +254,6 @@ static int snd_vx222_probe(struct pci_dev *pci,
static void snd_vx222_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
#ifdef CONFIG_PM_SLEEP


+ 0
- 1
sound/pci/ymfpci/ymfpci.c View File

@ -347,7 +347,6 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci,
static void snd_card_ymfpci_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
pci_set_drvdata(pci, NULL);
}
static struct pci_driver ymfpci_driver = {


Loading…
Cancel
Save