memset(&bus_temp, 0, sizeof(bus_temp));
bus_temp.private_data = chip;
bus_temp.modelname = model;
- bus_temp.power_save = &power_save;
bus_temp.pci = chip->pci;
bus_temp.ops.command = azx_send_cmd;
bus_temp.ops.get_response = azx_get_response;
bus_temp.ops.attach_pcm = azx_attach_pcm_stream;
#ifdef CONFIG_SND_HDA_POWER_SAVE
+ bus_temp.power_save = &power_save;
bus_temp.ops.pm_notify = azx_power_notify;
#endif
else if (chip->running && power_save_controller)
azx_stop_chip(chip);
}
+#endif /* CONFIG_SND_HDA_POWER_SAVE */
+
+#ifdef CONFIG_PM
+/*
+ * power management
+ */
static int snd_hda_codecs_inuse(struct hda_bus *bus)
{
}
return 0;
}
-#else /* !CONFIG_SND_HDA_POWER_SAVE */
-#define snd_hda_codecs_inuse(bus) 1
-#endif /* CONFIG_SND_HDA_POWER_SAVE */
-#ifdef CONFIG_PM
-/*
- * power management
- */
static int azx_suspend(struct pci_dev *pci, pm_message_t state)
{
struct snd_card *card = pci_get_drvdata(pci);
}
chip->addr = pci_resource_start(pci, 0);
- chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci,0));
+ chip->remap_addr = pci_ioremap_bar(pci, 0);
if (chip->remap_addr == NULL) {
snd_printk(KERN_ERR SFX "ioremap error\n");
err = -ENXIO;