Loading sound/pci/hda/hda_controller.c +26 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h> #include <linux/reboot.h> #include <sound/core.h> #include <sound/initval.h> #include "hda_priv.h" Loading Loading @@ -1946,5 +1947,30 @@ int azx_init_stream(struct azx *chip) } EXPORT_SYMBOL_GPL(azx_init_stream); /* * reboot notifier for hang-up problem at power-down */ static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf) { struct azx *chip = container_of(nb, struct azx, reboot_notifier); snd_hda_bus_reboot_notify(chip->bus); azx_stop_chip(chip); return NOTIFY_OK; } void azx_notifier_register(struct azx *chip) { chip->reboot_notifier.notifier_call = azx_halt; register_reboot_notifier(&chip->reboot_notifier); } EXPORT_SYMBOL_GPL(azx_notifier_register); void azx_notifier_unregister(struct azx *chip) { if (chip->reboot_notifier.notifier_call) unregister_reboot_notifier(&chip->reboot_notifier); } EXPORT_SYMBOL_GPL(azx_notifier_unregister); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Common HDA driver funcitons"); sound/pci/hda/hda_controller.h +3 −0 Original line number Diff line number Diff line Loading @@ -50,4 +50,7 @@ int azx_codec_configure(struct azx *chip); int azx_mixer_create(struct azx *chip); int azx_init_stream(struct azx *chip); void azx_notifier_register(struct azx *chip); void azx_notifier_unregister(struct azx *chip); #endif /* __SOUND_HDA_CONTROLLER_H */ sound/pci/hda/hda_intel.c +0 −24 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ #include <linux/slab.h> #include <linux/pci.h> #include <linux/mutex.h> #include <linux/reboot.h> #include <linux/io.h> #include <linux/pm_runtime.h> #include <linux/clocksource.h> Loading Loading @@ -952,29 +951,6 @@ static const struct dev_pm_ops azx_pm = { #endif /* CONFIG_PM */ /* * reboot notifier for hang-up problem at power-down */ static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf) { struct azx *chip = container_of(nb, struct azx, reboot_notifier); snd_hda_bus_reboot_notify(chip->bus); azx_stop_chip(chip); return NOTIFY_OK; } static void azx_notifier_register(struct azx *chip) { chip->reboot_notifier.notifier_call = azx_halt; register_reboot_notifier(&chip->reboot_notifier); } static void azx_notifier_unregister(struct azx *chip) { if (chip->reboot_notifier.notifier_call) unregister_reboot_notifier(&chip->reboot_notifier); } static int azx_probe_continue(struct azx *chip); #ifdef SUPPORT_VGA_SWITCHEROO Loading sound/pci/hda/hda_tegra.c +2 −27 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ #include <linux/moduleparam.h> #include <linux/mutex.h> #include <linux/of_device.h> #include <linux/reboot.h> #include <linux/slab.h> #include <linux/time.h> Loading Loading @@ -294,30 +293,6 @@ static const struct dev_pm_ops hda_tegra_pm = { SET_SYSTEM_SLEEP_PM_OPS(hda_tegra_suspend, hda_tegra_resume) }; /* * reboot notifier for hang-up problem at power-down */ static int hda_tegra_halt(struct notifier_block *nb, unsigned long event, void *buf) { struct azx *chip = container_of(nb, struct azx, reboot_notifier); snd_hda_bus_reboot_notify(chip->bus); azx_stop_chip(chip); return NOTIFY_OK; } static void hda_tegra_notifier_register(struct azx *chip) { chip->reboot_notifier.notifier_call = hda_tegra_halt; register_reboot_notifier(&chip->reboot_notifier); } static void hda_tegra_notifier_unregister(struct azx *chip) { if (chip->reboot_notifier.notifier_call) unregister_reboot_notifier(&chip->reboot_notifier); } /* * destructor */ Loading @@ -326,7 +301,7 @@ static int hda_tegra_dev_free(struct snd_device *device) int i; struct azx *chip = device->device_data; hda_tegra_notifier_unregister(chip); azx_notifier_unregister(chip); if (chip->initialized) { for (i = 0; i < chip->num_streams; i++) Loading Loading @@ -557,7 +532,7 @@ static int hda_tegra_probe(struct platform_device *pdev) chip->running = 1; power_down_all_codecs(chip); hda_tegra_notifier_register(chip); azx_notifier_register(chip); return 0; Loading Loading
sound/pci/hda/hda_controller.c +26 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h> #include <linux/reboot.h> #include <sound/core.h> #include <sound/initval.h> #include "hda_priv.h" Loading Loading @@ -1946,5 +1947,30 @@ int azx_init_stream(struct azx *chip) } EXPORT_SYMBOL_GPL(azx_init_stream); /* * reboot notifier for hang-up problem at power-down */ static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf) { struct azx *chip = container_of(nb, struct azx, reboot_notifier); snd_hda_bus_reboot_notify(chip->bus); azx_stop_chip(chip); return NOTIFY_OK; } void azx_notifier_register(struct azx *chip) { chip->reboot_notifier.notifier_call = azx_halt; register_reboot_notifier(&chip->reboot_notifier); } EXPORT_SYMBOL_GPL(azx_notifier_register); void azx_notifier_unregister(struct azx *chip) { if (chip->reboot_notifier.notifier_call) unregister_reboot_notifier(&chip->reboot_notifier); } EXPORT_SYMBOL_GPL(azx_notifier_unregister); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Common HDA driver funcitons");
sound/pci/hda/hda_controller.h +3 −0 Original line number Diff line number Diff line Loading @@ -50,4 +50,7 @@ int azx_codec_configure(struct azx *chip); int azx_mixer_create(struct azx *chip); int azx_init_stream(struct azx *chip); void azx_notifier_register(struct azx *chip); void azx_notifier_unregister(struct azx *chip); #endif /* __SOUND_HDA_CONTROLLER_H */
sound/pci/hda/hda_intel.c +0 −24 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ #include <linux/slab.h> #include <linux/pci.h> #include <linux/mutex.h> #include <linux/reboot.h> #include <linux/io.h> #include <linux/pm_runtime.h> #include <linux/clocksource.h> Loading Loading @@ -952,29 +951,6 @@ static const struct dev_pm_ops azx_pm = { #endif /* CONFIG_PM */ /* * reboot notifier for hang-up problem at power-down */ static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf) { struct azx *chip = container_of(nb, struct azx, reboot_notifier); snd_hda_bus_reboot_notify(chip->bus); azx_stop_chip(chip); return NOTIFY_OK; } static void azx_notifier_register(struct azx *chip) { chip->reboot_notifier.notifier_call = azx_halt; register_reboot_notifier(&chip->reboot_notifier); } static void azx_notifier_unregister(struct azx *chip) { if (chip->reboot_notifier.notifier_call) unregister_reboot_notifier(&chip->reboot_notifier); } static int azx_probe_continue(struct azx *chip); #ifdef SUPPORT_VGA_SWITCHEROO Loading
sound/pci/hda/hda_tegra.c +2 −27 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ #include <linux/moduleparam.h> #include <linux/mutex.h> #include <linux/of_device.h> #include <linux/reboot.h> #include <linux/slab.h> #include <linux/time.h> Loading Loading @@ -294,30 +293,6 @@ static const struct dev_pm_ops hda_tegra_pm = { SET_SYSTEM_SLEEP_PM_OPS(hda_tegra_suspend, hda_tegra_resume) }; /* * reboot notifier for hang-up problem at power-down */ static int hda_tegra_halt(struct notifier_block *nb, unsigned long event, void *buf) { struct azx *chip = container_of(nb, struct azx, reboot_notifier); snd_hda_bus_reboot_notify(chip->bus); azx_stop_chip(chip); return NOTIFY_OK; } static void hda_tegra_notifier_register(struct azx *chip) { chip->reboot_notifier.notifier_call = hda_tegra_halt; register_reboot_notifier(&chip->reboot_notifier); } static void hda_tegra_notifier_unregister(struct azx *chip) { if (chip->reboot_notifier.notifier_call) unregister_reboot_notifier(&chip->reboot_notifier); } /* * destructor */ Loading @@ -326,7 +301,7 @@ static int hda_tegra_dev_free(struct snd_device *device) int i; struct azx *chip = device->device_data; hda_tegra_notifier_unregister(chip); azx_notifier_unregister(chip); if (chip->initialized) { for (i = 0; i < chip->num_streams; i++) Loading Loading @@ -557,7 +532,7 @@ static int hda_tegra_probe(struct platform_device *pdev) chip->running = 1; power_down_all_codecs(chip); hda_tegra_notifier_register(chip); azx_notifier_register(chip); return 0; Loading