pm_runtime_disable(&hdev->dev);
}
-#ifdef CONFIG_PM_SLEEP
static int hdmi_codec_resume(struct device *dev)
{
struct hdac_device *hdev = dev_to_hdac_dev(dev);
hdac_hdmi_present_sense_all_pins(hdev, hdmi, false);
return 0;
}
-#else
-#define hdmi_codec_resume NULL
-#endif
static const struct snd_soc_component_driver hdmi_hda_codec = {
.probe = hdmi_codec_probe,
return 0;
}
-#ifdef CONFIG_PM
static int hdac_hdmi_runtime_suspend(struct device *dev)
{
struct hdac_device *hdev = dev_to_hdac_dev(dev);
return 0;
}
-#else
-#define hdac_hdmi_runtime_suspend NULL
-#define hdac_hdmi_runtime_resume NULL
-#endif
static const struct dev_pm_ops hdac_hdmi_pm = {
- SET_RUNTIME_PM_OPS(hdac_hdmi_runtime_suspend, hdac_hdmi_runtime_resume, NULL)
- SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, hdmi_codec_resume)
+ RUNTIME_PM_OPS(hdac_hdmi_runtime_suspend, hdac_hdmi_runtime_resume, NULL)
+ SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, hdmi_codec_resume)
};
static const struct hda_device_id hdmi_list[] = {
static struct hdac_driver hdmi_driver = {
.driver = {
.name = "HDMI HDA Codec",
- .pm = &hdac_hdmi_pm,
+ .pm = pm_ptr(&hdac_hdmi_pm),
},
.id_table = hdmi_list,
.probe = hdac_hdmi_dev_probe,