Skip to content

Commit

Permalink
ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP
Browse files Browse the repository at this point in the history
Otherwise we may get compile warnings due to unused functions.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Aug 14, 2012
1 parent 7ccbde5 commit c7561cd
Show file tree
Hide file tree
Showing 63 changed files with 135 additions and 135 deletions.
4 changes: 2 additions & 2 deletions include/sound/emu10k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -1788,7 +1788,7 @@ struct snd_emu10k1 {
unsigned int efx_voices_mask[2];
unsigned int next_free_voice;

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
unsigned int *saved_ptr;
unsigned int *saved_gpr;
unsigned int *tram_val_saved;
Expand Down Expand Up @@ -1856,7 +1856,7 @@ unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data);
unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate);

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu);
void snd_emu10k1_resume_init(struct snd_emu10k1 *emu);
void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu);
Expand Down
10 changes: 5 additions & 5 deletions sound/pci/ali5451/ali5451.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ struct snd_ali {
spinlock_t reg_lock;
spinlock_t voice_alloc;

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
struct snd_ali_image *image;
#endif
};
Expand Down Expand Up @@ -1883,7 +1883,7 @@ static int __devinit snd_ali_mixer(struct snd_ali * codec)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int ali_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
Expand Down Expand Up @@ -1989,7 +1989,7 @@ static SIMPLE_DEV_PM_OPS(ali_pm, ali_suspend, ali_resume);
#define ALI_PM_OPS &ali_pm
#else
#define ALI_PM_OPS NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static int snd_ali_free(struct snd_ali * codec)
{
Expand All @@ -2000,7 +2000,7 @@ static int snd_ali_free(struct snd_ali * codec)
if (codec->port)
pci_release_regions(codec->pci);
pci_disable_device(codec->pci);
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
kfree(codec->image);
#endif
pci_dev_put(codec->pci_m1533);
Expand Down Expand Up @@ -2232,7 +2232,7 @@ static int __devinit snd_ali_create(struct snd_card *card,
return err;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
codec->image = kmalloc(sizeof(*codec->image), GFP_KERNEL);
if (!codec->image)
snd_printk(KERN_WARNING "can't allocate apm buffer\n");
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/als300.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ static int __devinit snd_als300_create(struct snd_card *card,
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int snd_als300_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/als4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ static void __devexit snd_card_als4000_remove(struct pci_dev *pci)
pci_set_drvdata(pci, NULL);
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int snd_als4000_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
Expand Down Expand Up @@ -1040,7 +1040,7 @@ static SIMPLE_DEV_PM_OPS(snd_als4000_pm, snd_als4000_suspend, snd_als4000_resume
#define SND_ALS4000_PM_OPS &snd_als4000_pm
#else
#define SND_ALS4000_PM_OPS NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static struct pci_driver als4000_driver = {
.name = KBUILD_MODNAME,
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/asihpi/asihpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2968,7 +2968,7 @@ static struct pci_driver driver = {
.id_table = asihpi_pci_tbl,
.probe = snd_asihpi_probe,
.remove = __devexit_p(snd_asihpi_remove),
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
/* .suspend = snd_asihpi_suspend,
.resume = snd_asihpi_resume, */
#endif
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ static int snd_atiixp_aclink_reset(struct atiixp *chip)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int snd_atiixp_aclink_down(struct atiixp *chip)
{
// if (atiixp_read(chip, MODEM_MIRROR) & 0x1) /* modem running, too? */
Expand Down Expand Up @@ -1458,7 +1458,7 @@ static int __devinit snd_atiixp_mixer_new(struct atiixp *chip, int clock,
}


#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
/*
* power management
*/
Expand Down Expand Up @@ -1533,7 +1533,7 @@ static SIMPLE_DEV_PM_OPS(snd_atiixp_pm, snd_atiixp_suspend, snd_atiixp_resume);
#define SND_ATIIXP_PM_OPS &snd_atiixp_pm
#else
#define SND_ATIIXP_PM_OPS NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */


#ifdef CONFIG_PROC_FS
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/atiixp_modem.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ static int snd_atiixp_aclink_reset(struct atiixp_modem *chip)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int snd_atiixp_aclink_down(struct atiixp_modem *chip)
{
// if (atiixp_read(chip, MODEM_MIRROR) & 0x1) /* modem running, too? */
Expand Down Expand Up @@ -1113,7 +1113,7 @@ static int __devinit snd_atiixp_mixer_new(struct atiixp_modem *chip, int clock)
}


#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
/*
* power management
*/
Expand Down Expand Up @@ -1169,7 +1169,7 @@ static SIMPLE_DEV_PM_OPS(snd_atiixp_pm, snd_atiixp_suspend, snd_atiixp_resume);
#define SND_ATIIXP_PM_OPS &snd_atiixp_pm
#else
#define SND_ATIIXP_PM_OPS NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

#ifdef CONFIG_PROC_FS
/*
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/azt3328.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ struct snd_azf3328 {
* CONFIG_PM register storage below, but that's slightly difficult. */
u16 shadow_reg_ctrl_6AH;

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
/* register value containers for power management
* Note: not always full I/O range preserved (similar to Win driver!) */
u32 saved_regs_ctrl[AZF_ALIGN(AZF_IO_SIZE_CTRL_PM) / 4];
Expand Down Expand Up @@ -2729,7 +2729,7 @@ snd_azf3328_remove(struct pci_dev *pci)
snd_azf3328_dbgcallleave();
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static inline void
snd_azf3328_suspend_regs(unsigned long io_addr, unsigned count, u32 *saved_regs)
{
Expand Down Expand Up @@ -2866,7 +2866,7 @@ static SIMPLE_DEV_PM_OPS(snd_azf3328_pm, snd_azf3328_suspend, snd_azf3328_resume
#define SND_AZF3328_PM_OPS &snd_azf3328_pm
#else
#define SND_AZF3328_PM_OPS NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static struct pci_driver azf3328_driver = {
.name = KBUILD_MODNAME,
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/ca0106/ca0106.h
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ struct snd_ca0106 {

u16 spi_dac_reg[16];

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
#define NUM_SAVED_VOLUMES 9
unsigned int saved_vol[NUM_SAVED_VOLUMES];
#endif
Expand All @@ -733,7 +733,7 @@ int snd_ca0106_i2c_write(struct snd_ca0106 *emu, u32 reg, u32 value);
int snd_ca0106_spi_write(struct snd_ca0106 * emu,
unsigned int data);

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
void snd_ca0106_mixer_suspend(struct snd_ca0106 *chip);
void snd_ca0106_mixer_resume(struct snd_ca0106 *chip);
#else
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/ca0106/ca0106_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1871,7 +1871,7 @@ static void __devexit snd_ca0106_remove(struct pci_dev *pci)
pci_set_drvdata(pci, NULL);
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int snd_ca0106_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/ca0106/ca0106_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
struct ca0106_vol_tbl {
unsigned int channel_id;
unsigned int reg;
Expand Down Expand Up @@ -953,4 +953,4 @@ void snd_ca0106_mixer_resume(struct snd_ca0106 *chip)
if (chip->details->i2c_adc)
ca0106_set_capture_mic_line_in(chip);
}
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */
6 changes: 3 additions & 3 deletions sound/pci/cmipci.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ struct cmipci {

spinlock_t reg_lock;

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
unsigned int saved_regs[0x20];
unsigned char saved_mixers[0x20];
#endif
Expand Down Expand Up @@ -3315,7 +3315,7 @@ static void __devexit snd_cmipci_remove(struct pci_dev *pci)
}


#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
/*
* power management
*/
Expand Down Expand Up @@ -3403,7 +3403,7 @@ static SIMPLE_DEV_PM_OPS(snd_cmipci_pm, snd_cmipci_suspend, snd_cmipci_resume);
#define SND_CMIPCI_PM_OPS &snd_cmipci_pm
#else
#define SND_CMIPCI_PM_OPS NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static struct pci_driver cmipci_driver = {
.name = KBUILD_MODNAME,
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/cs4281.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ struct cs4281 {

struct gameport *gameport;

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
u32 suspend_regs[SUSPEND_REGISTERS];
#endif

Expand Down Expand Up @@ -1977,7 +1977,7 @@ static void __devexit snd_cs4281_remove(struct pci_dev *pci)
/*
* Power Management
*/
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP

static int saved_regs[SUSPEND_REGISTERS] = {
BA0_JSCTL,
Expand Down Expand Up @@ -2089,7 +2089,7 @@ static SIMPLE_DEV_PM_OPS(cs4281_pm, cs4281_suspend, cs4281_resume);
#define CS4281_PM_OPS &cs4281_pm
#else
#define CS4281_PM_OPS NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static struct pci_driver cs4281_driver = {
.name = KBUILD_MODNAME,
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/cs46xx/cs46xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static struct pci_driver cs46xx_driver = {
.id_table = snd_cs46xx_ids,
.probe = snd_card_cs46xx_probe,
.remove = __devexit_p(snd_card_cs46xx_remove),
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
.driver = {
.pm = &snd_cs46xx_pm,
},
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/cs46xx/cs46xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,7 @@ struct snd_cs46xx {
unsigned int play_ctl;
#endif

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
u32 *saved_regs;
#endif
};
Expand Down
8 changes: 4 additions & 4 deletions sound/pci/cs46xx/cs46xx_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2797,7 +2797,7 @@ static int snd_cs46xx_free(struct snd_cs46xx *chip)
}
#endif

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
kfree(chip->saved_regs);
#endif

Expand Down Expand Up @@ -3590,7 +3590,7 @@ static struct cs_card_type __devinitdata cards[] = {
/*
* APM support
*/
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static unsigned int saved_regs[] = {
BA0_ACOSV,
/*BA0_ASER_FADDR,*/
Expand Down Expand Up @@ -3711,7 +3711,7 @@ static int snd_cs46xx_resume(struct device *dev)
}

SIMPLE_DEV_PM_OPS(snd_cs46xx_pm, snd_cs46xx_suspend, snd_cs46xx_resume);
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */


/*
Expand Down Expand Up @@ -3868,7 +3868,7 @@ int __devinit snd_cs46xx_create(struct snd_card *card,

snd_cs46xx_proc_init(card, chip);

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
chip->saved_regs = kmalloc(sizeof(*chip->saved_regs) *
ARRAY_SIZE(saved_regs), GFP_KERNEL);
if (!chip->saved_regs) {
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/cs46xx/cs46xx_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static inline unsigned int snd_cs46xx_peekBA0(struct snd_cs46xx *chip, unsigned
struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip);
void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip);
int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module);
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
int cs46xx_dsp_resume(struct snd_cs46xx * chip);
#endif
struct dsp_symbol_entry *cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name,
Expand Down
8 changes: 4 additions & 4 deletions sound/pci/cs46xx/dsp_spos.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip)
if (ins->scbs[i].deleted) continue;

cs46xx_dsp_proc_free_scb_desc ( (ins->scbs + i) );
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
kfree(ins->scbs[i].data);
#endif
}
Expand Down Expand Up @@ -1019,7 +1019,7 @@ cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32
{
struct dsp_scb_descriptor * desc;

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
/* copy the data for resume */
scb_data = kmemdup(scb_data, SCB_BYTES, GFP_KERNEL);
if (!scb_data)
Expand All @@ -1032,7 +1032,7 @@ cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32
_dsp_create_scb(chip,scb_data,dest);
} else {
snd_printk(KERN_ERR "dsp_spos: failed to map SCB\n");
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
kfree(scb_data);
#endif
}
Expand Down Expand Up @@ -1937,7 +1937,7 @@ int cs46xx_dsp_set_iec958_volume (struct snd_cs46xx * chip, u16 left, u16 right)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
int cs46xx_dsp_resume(struct snd_cs46xx * chip)
{
struct dsp_spos_instance * ins = chip->dsp_spos_instance;
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/cs46xx/dsp_spos_scb_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor *
remove_symbol (chip,scb->scb_symbol);

ins->scbs[scb->index].deleted = 1;
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
kfree(ins->scbs[scb->index].data);
ins->scbs[scb->index].data = NULL;
#endif
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/cs5535audio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

snd-cs5535audio-y := cs5535audio.o cs5535audio_pcm.o
snd-cs5535audio-$(CONFIG_PM) += cs5535audio_pm.o
snd-cs5535audio-$(CONFIG_PM_SLEEP) += cs5535audio_pm.o
snd-cs5535audio-$(CONFIG_OLPC) += cs5535audio_olpc.o

# Toplevel Module Dependency
Expand Down
Loading

0 comments on commit c7561cd

Please sign in to comment.