/* linked list */
struct list_head list;
-#ifdef CONFIG_PM_SLEEP
u16 wc_map[4];
-#endif
};
struct es1968 {
struct list_head substream_list;
spinlock_t substream_lock;
-#ifdef CONFIG_PM_SLEEP
u16 apu_map[NR_APUS][NR_APU_REGS];
-#endif
#ifdef SUPPORT_JOYSTICK
struct gameport *gameport;
{
if (snd_BUG_ON(channel >= NR_APUS))
return;
-#ifdef CONFIG_PM_SLEEP
chip->apu_map[channel][reg] = data;
-#endif
reg |= (channel << 4);
apu_index_set(chip, reg);
apu_data_set(chip, data);
/* set the wavecache control reg */
wave_set_register(chip, es->apu[channel] << 3, tmpval);
-#ifdef CONFIG_PM_SLEEP
es->wc_map[channel] = tmpval;
-#endif
}
outw(w, chip->io_port + ESM_PORT_HOST_IRQ);
}
-#ifdef CONFIG_PM_SLEEP
/*
* PM support
*/
return 0;
}
-static SIMPLE_DEV_PM_OPS(es1968_pm, es1968_suspend, es1968_resume);
-#define ES1968_PM_OPS &es1968_pm
-#else
-#define ES1968_PM_OPS NULL
-#endif /* CONFIG_PM_SLEEP */
+static DEFINE_SIMPLE_DEV_PM_OPS(es1968_pm, es1968_suspend, es1968_resume);
#ifdef SUPPORT_JOYSTICK
#define JOYSTICK_ADDR 0x200
.id_table = snd_es1968_ids,
.probe = snd_es1968_probe,
.driver = {
- .pm = ES1968_PM_OPS,
+ .pm = &es1968_pm,
},
};