diff options
-rw-r--r-- | sound/pci/maestro3.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 04fa0a68416c..a753dae65ab6 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c | |||
@@ -2068,7 +2068,7 @@ static int __devinit snd_m3_mixer(struct snd_m3 *chip) | |||
2068 | { | 2068 | { |
2069 | struct snd_ac97_bus *pbus; | 2069 | struct snd_ac97_bus *pbus; |
2070 | struct snd_ac97_template ac97; | 2070 | struct snd_ac97_template ac97; |
2071 | struct snd_ctl_elem_id id; | 2071 | struct snd_ctl_elem_id elem_id; |
2072 | int err; | 2072 | int err; |
2073 | static struct snd_ac97_bus_ops ops = { | 2073 | static struct snd_ac97_bus_ops ops = { |
2074 | .write = snd_m3_ac97_write, | 2074 | .write = snd_m3_ac97_write, |
@@ -2088,14 +2088,14 @@ static int __devinit snd_m3_mixer(struct snd_m3 *chip) | |||
2088 | schedule_timeout_uninterruptible(msecs_to_jiffies(100)); | 2088 | schedule_timeout_uninterruptible(msecs_to_jiffies(100)); |
2089 | snd_ac97_write(chip->ac97, AC97_PCM, 0); | 2089 | snd_ac97_write(chip->ac97, AC97_PCM, 0); |
2090 | 2090 | ||
2091 | memset(&id, 0, sizeof(id)); | 2091 | memset(&elem_id, 0, sizeof(elem_id)); |
2092 | id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; | 2092 | elem_id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; |
2093 | strcpy(id.name, "Master Playback Switch"); | 2093 | strcpy(elem_id.name, "Master Playback Switch"); |
2094 | chip->master_switch = snd_ctl_find_id(chip->card, &id); | 2094 | chip->master_switch = snd_ctl_find_id(chip->card, &elem_id); |
2095 | memset(&id, 0, sizeof(id)); | 2095 | memset(&elem_id, 0, sizeof(elem_id)); |
2096 | id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; | 2096 | elem_id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; |
2097 | strcpy(id.name, "Master Playback Volume"); | 2097 | strcpy(elem_id.name, "Master Playback Volume"); |
2098 | chip->master_volume = snd_ctl_find_id(chip->card, &id); | 2098 | chip->master_volume = snd_ctl_find_id(chip->card, &elem_id); |
2099 | 2099 | ||
2100 | return 0; | 2100 | return 0; |
2101 | } | 2101 | } |
@@ -2569,7 +2569,7 @@ static int m3_suspend(struct pci_dev *pci, pm_message_t state) | |||
2569 | { | 2569 | { |
2570 | struct snd_card *card = pci_get_drvdata(pci); | 2570 | struct snd_card *card = pci_get_drvdata(pci); |
2571 | struct snd_m3 *chip = card->private_data; | 2571 | struct snd_m3 *chip = card->private_data; |
2572 | int i, index; | 2572 | int i, dsp_index; |
2573 | 2573 | ||
2574 | if (chip->suspend_mem == NULL) | 2574 | if (chip->suspend_mem == NULL) |
2575 | return 0; | 2575 | return 0; |
@@ -2583,12 +2583,12 @@ static int m3_suspend(struct pci_dev *pci, pm_message_t state) | |||
2583 | snd_m3_assp_halt(chip); | 2583 | snd_m3_assp_halt(chip); |
2584 | 2584 | ||
2585 | /* save dsp image */ | 2585 | /* save dsp image */ |
2586 | index = 0; | 2586 | dsp_index = 0; |
2587 | for (i = REV_B_CODE_MEMORY_BEGIN; i <= REV_B_CODE_MEMORY_END; i++) | 2587 | for (i = REV_B_CODE_MEMORY_BEGIN; i <= REV_B_CODE_MEMORY_END; i++) |
2588 | chip->suspend_mem[index++] = | 2588 | chip->suspend_mem[dsp_index++] = |
2589 | snd_m3_assp_read(chip, MEMTYPE_INTERNAL_CODE, i); | 2589 | snd_m3_assp_read(chip, MEMTYPE_INTERNAL_CODE, i); |
2590 | for (i = REV_B_DATA_MEMORY_BEGIN ; i <= REV_B_DATA_MEMORY_END; i++) | 2590 | for (i = REV_B_DATA_MEMORY_BEGIN ; i <= REV_B_DATA_MEMORY_END; i++) |
2591 | chip->suspend_mem[index++] = | 2591 | chip->suspend_mem[dsp_index++] = |
2592 | snd_m3_assp_read(chip, MEMTYPE_INTERNAL_DATA, i); | 2592 | snd_m3_assp_read(chip, MEMTYPE_INTERNAL_DATA, i); |
2593 | 2593 | ||
2594 | pci_disable_device(pci); | 2594 | pci_disable_device(pci); |
@@ -2601,7 +2601,7 @@ static int m3_resume(struct pci_dev *pci) | |||
2601 | { | 2601 | { |
2602 | struct snd_card *card = pci_get_drvdata(pci); | 2602 | struct snd_card *card = pci_get_drvdata(pci); |
2603 | struct snd_m3 *chip = card->private_data; | 2603 | struct snd_m3 *chip = card->private_data; |
2604 | int i, index; | 2604 | int i, dsp_index; |
2605 | 2605 | ||
2606 | if (chip->suspend_mem == NULL) | 2606 | if (chip->suspend_mem == NULL) |
2607 | return 0; | 2607 | return 0; |
@@ -2625,13 +2625,13 @@ static int m3_resume(struct pci_dev *pci) | |||
2625 | snd_m3_ac97_reset(chip); | 2625 | snd_m3_ac97_reset(chip); |
2626 | 2626 | ||
2627 | /* restore dsp image */ | 2627 | /* restore dsp image */ |
2628 | index = 0; | 2628 | dsp_index = 0; |
2629 | for (i = REV_B_CODE_MEMORY_BEGIN; i <= REV_B_CODE_MEMORY_END; i++) | 2629 | for (i = REV_B_CODE_MEMORY_BEGIN; i <= REV_B_CODE_MEMORY_END; i++) |
2630 | snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE, i, | 2630 | snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE, i, |
2631 | chip->suspend_mem[index++]); | 2631 | chip->suspend_mem[dsp_index++]); |
2632 | for (i = REV_B_DATA_MEMORY_BEGIN ; i <= REV_B_DATA_MEMORY_END; i++) | 2632 | for (i = REV_B_DATA_MEMORY_BEGIN ; i <= REV_B_DATA_MEMORY_END; i++) |
2633 | snd_m3_assp_write(chip, MEMTYPE_INTERNAL_DATA, i, | 2633 | snd_m3_assp_write(chip, MEMTYPE_INTERNAL_DATA, i, |
2634 | chip->suspend_mem[index++]); | 2634 | chip->suspend_mem[dsp_index++]); |
2635 | 2635 | ||
2636 | /* tell the dma engine to restart itself */ | 2636 | /* tell the dma engine to restart itself */ |
2637 | snd_m3_assp_write(chip, MEMTYPE_INTERNAL_DATA, | 2637 | snd_m3_assp_write(chip, MEMTYPE_INTERNAL_DATA, |