]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - sound/soc/codecs/hdac_hdmi.c
ALSA: hda: Make snd_hdac_display_power() void function
[linux.git] / sound / soc / codecs / hdac_hdmi.c
index 4e9854889a9570dd66e9476fb7a9b082053016e7..552ed1968bc42a8099750c429d9bd6f781e59b97 100644 (file)
@@ -2031,13 +2031,7 @@ static int hdac_hdmi_dev_probe(struct hdac_device *hdev)
         * Turned off in the runtime_suspend during the first explicit
         * pm_runtime_suspend call.
         */
-       ret = snd_hdac_display_power(hdev->bus, true);
-       if (ret < 0) {
-               dev_err(&hdev->dev,
-                       "Cannot turn on display power on i915 err: %d\n",
-                       ret);
-               return ret;
-       }
+       snd_hdac_display_power(hdev->bus, hdev->addr, true);
 
        ret = hdac_hdmi_parse_and_map_nid(hdev, &hdmi_dais, &num_dais);
        if (ret < 0) {
@@ -2170,7 +2164,6 @@ static int hdac_hdmi_runtime_suspend(struct device *dev)
        struct hdac_device *hdev = dev_to_hdac_dev(dev);
        struct hdac_bus *bus = hdev->bus;
        struct hdac_ext_link *hlink = NULL;
-       int err;
 
        dev_dbg(dev, "Enter: %s\n", __func__);
 
@@ -2187,11 +2180,6 @@ static int hdac_hdmi_runtime_suspend(struct device *dev)
         */
        snd_hdac_codec_read(hdev, hdev->afg, 0, AC_VERB_SET_POWER_STATE,
                                                        AC_PWRST_D3);
-       err = snd_hdac_display_power(bus, false);
-       if (err < 0) {
-               dev_err(dev, "Cannot turn on display power on i915\n");
-               return err;
-       }
 
        hlink = snd_hdac_ext_bus_get_link(bus, dev_name(dev));
        if (!hlink) {
@@ -2201,6 +2189,8 @@ static int hdac_hdmi_runtime_suspend(struct device *dev)
 
        snd_hdac_ext_bus_link_put(bus, hlink);
 
+       snd_hdac_display_power(bus, hdev->addr, false);
+
        return 0;
 }
 
@@ -2209,7 +2199,6 @@ static int hdac_hdmi_runtime_resume(struct device *dev)
        struct hdac_device *hdev = dev_to_hdac_dev(dev);
        struct hdac_bus *bus = hdev->bus;
        struct hdac_ext_link *hlink = NULL;
-       int err;
 
        dev_dbg(dev, "Enter: %s\n", __func__);
 
@@ -2225,11 +2214,7 @@ static int hdac_hdmi_runtime_resume(struct device *dev)
 
        snd_hdac_ext_bus_link_get(bus, hlink);
 
-       err = snd_hdac_display_power(bus, true);
-       if (err < 0) {
-               dev_err(dev, "Cannot turn on display power on i915\n");
-               return err;
-       }
+       snd_hdac_display_power(bus, hdev->addr, true);
 
        hdac_hdmi_skl_enable_all_pins(hdev);
        hdac_hdmi_skl_enable_dp12(hdev);