ALSA: hda - Remove pre_resume and post_suspend ops
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 May 2012 08:31:08 +0000 (10:31 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 9 May 2012 08:32:35 +0000 (10:32 +0200)
Since the recent commit, the resume procedure is always performed at
the resume time.  This makes the pre_resume hack for VREF mute LED on
some HP laptops superfluous.  As this is the only user of pre_resume
(and there is no user of post_suspend) ops, let's kill them again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.h
sound/pci/hda/patch_sigmatel.c

index f2bdf38be395403d288071dc13a2a3a8d3c67130..e0f8667ae2265ae5ffdef14a6352e5afb92ce759 100644 (file)
@@ -4930,8 +4930,6 @@ int snd_hda_suspend(struct hda_bus *bus)
        list_for_each_entry(codec, &bus->codec_list, list) {
                if (hda_codec_is_power_on(codec))
                        hda_call_codec_suspend(codec);
-               if (codec->patch_ops.post_suspend)
-                       codec->patch_ops.post_suspend(codec);
        }
        return 0;
 }
@@ -4951,8 +4949,6 @@ int snd_hda_resume(struct hda_bus *bus)
        struct hda_codec *codec;
 
        list_for_each_entry(codec, &bus->codec_list, list) {
-               if (codec->patch_ops.pre_resume)
-                       codec->patch_ops.pre_resume(codec);
                hda_call_codec_resume(codec);
        }
        return 0;
index 77cd99531aae949372ea61a719e08945ca6f218e..78f89147d620e57978690a593582261bbcb226b6 100644 (file)
@@ -704,8 +704,6 @@ struct hda_codec_ops {
                                unsigned int power_state);
 #ifdef CONFIG_PM
        int (*suspend)(struct hda_codec *codec, pm_message_t state);
-       int (*post_suspend)(struct hda_codec *codec);
-       int (*pre_resume)(struct hda_codec *codec);
        int (*resume)(struct hda_codec *codec);
 #endif
 #ifdef CONFIG_SND_HDA_POWER_SAVE
index baf1edde244d45c5bfdb45ea80afbbb9e9686470..b04179be6205f4592f88a2eae826e510b9525bb1 100644 (file)
@@ -4986,20 +4986,6 @@ static int stac92xx_suspend(struct hda_codec *codec, pm_message_t state)
        return 0;
 }
 
-static int stac92xx_pre_resume(struct hda_codec *codec)
-{
-       struct sigmatel_spec *spec = codec->spec;
-
-       /* sync mute LED */
-       if (spec->vref_mute_led_nid)
-               stac_vrefout_set(codec, spec->vref_mute_led_nid,
-                                spec->vref_led);
-       else if (spec->gpio_led)
-               stac_gpio_set(codec, spec->gpio_mask,
-                             spec->gpio_dir, spec->gpio_data);
-       return 0;
-}
-
 static void stac92xx_set_power_state(struct hda_codec *codec, hda_nid_t fg,
                                unsigned int power_state)
 {
@@ -5023,7 +5009,6 @@ static void stac92xx_set_power_state(struct hda_codec *codec, hda_nid_t fg,
 #else
 #define stac92xx_suspend       NULL
 #define stac92xx_resume                NULL
-#define stac92xx_pre_resume    NULL
 #define stac92xx_set_power_state NULL
 #endif /* CONFIG_PM */
 
@@ -5569,9 +5554,6 @@ again:
                        codec->patch_ops.set_power_state =
                                        stac92xx_set_power_state;
                }
-#ifdef CONFIG_PM
-               codec->patch_ops.pre_resume = stac92xx_pre_resume;
-#endif
        }
 
        err = stac92xx_parse_auto_config(codec);
@@ -5878,9 +5860,6 @@ again:
                        codec->patch_ops.set_power_state =
                                        stac92xx_set_power_state;
                }
-#ifdef CONFIG_PM
-               codec->patch_ops.pre_resume = stac92xx_pre_resume;
-#endif
        }
 
        spec->multiout.dac_nids = spec->dac_nids;