diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-07-05 10:51:05 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-07-12 14:08:01 -0400 |
commit | f40b68903ccd511ea9d658b4bce319dd032a265a (patch) | |
tree | 9f8447f4370f5e4d9303ca5c8e0b2c8cd790c67e /sound/pci/cs46xx | |
parent | 562b590d4e838ecaca2cfd246fd4df55dc6db18a (diff) |
[ALSA] Fix section mismatch errors in ALSA PCI drivers
Fixed 'section mismatch' errors in ALSA PCI drivers:
- removed invalid __devinitdata from pci id tables
- fix/remove __devinit of functions called in suspend/resume
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/cs46xx')
-rw-r--r-- | sound/pci/cs46xx/cs46xx.c | 2 | ||||
-rw-r--r-- | sound/pci/cs46xx/cs46xx_lib.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c index 772dc52bfeb2..8b6cd144d101 100644 --- a/sound/pci/cs46xx/cs46xx.c +++ b/sound/pci/cs46xx/cs46xx.c | |||
@@ -65,7 +65,7 @@ MODULE_PARM_DESC(thinkpad, "Force to enable Thinkpad's CLKRUN control."); | |||
65 | module_param_array(mmap_valid, bool, NULL, 0444); | 65 | module_param_array(mmap_valid, bool, NULL, 0444); |
66 | MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); | 66 | MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); |
67 | 67 | ||
68 | static struct pci_device_id snd_cs46xx_ids[] __devinitdata = { | 68 | static struct pci_device_id snd_cs46xx_ids[] = { |
69 | { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ | 69 | { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ |
70 | { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */ | 70 | { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */ |
71 | { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */ | 71 | { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */ |
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 894545ea41fd..4851847180d2 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c | |||
@@ -2317,7 +2317,7 @@ static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = { | |||
2317 | 2317 | ||
2318 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 2318 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
2319 | /* Only available on the Hercules Game Theater XP soundcard */ | 2319 | /* Only available on the Hercules Game Theater XP soundcard */ |
2320 | static struct snd_kcontrol_new snd_hercules_controls[] __devinitdata = { | 2320 | static struct snd_kcontrol_new snd_hercules_controls[] = { |
2321 | { | 2321 | { |
2322 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2322 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
2323 | .name = "Optical/Coaxial SPDIF Input Switch", | 2323 | .name = "Optical/Coaxial SPDIF Input Switch", |
@@ -3458,6 +3458,9 @@ static void hercules_mixer_init (struct snd_cs46xx *chip) | |||
3458 | snd_printdd ("initializing Hercules mixer\n"); | 3458 | snd_printdd ("initializing Hercules mixer\n"); |
3459 | 3459 | ||
3460 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 3460 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
3461 | if (chip->in_suspend) | ||
3462 | return; | ||
3463 | |||
3461 | for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { | 3464 | for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { |
3462 | struct snd_kcontrol *kctl; | 3465 | struct snd_kcontrol *kctl; |
3463 | 3466 | ||
@@ -3669,6 +3672,7 @@ int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state) | |||
3669 | int amp_saved; | 3672 | int amp_saved; |
3670 | 3673 | ||
3671 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 3674 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
3675 | chip->in_suspend = 1; | ||
3672 | snd_pcm_suspend_all(chip->pcm); | 3676 | snd_pcm_suspend_all(chip->pcm); |
3673 | // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); | 3677 | // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); |
3674 | // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); | 3678 | // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); |
@@ -3722,6 +3726,7 @@ int snd_cs46xx_resume(struct pci_dev *pci) | |||
3722 | else | 3726 | else |
3723 | chip->active_ctrl(chip, -1); /* disable CLKRUN */ | 3727 | chip->active_ctrl(chip, -1); /* disable CLKRUN */ |
3724 | chip->amplifier = amp_saved; | 3728 | chip->amplifier = amp_saved; |
3729 | chip->in_suspend = 0; | ||
3725 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 3730 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
3726 | return 0; | 3731 | return 0; |
3727 | } | 3732 | } |