https://github.com/torvalds/linux
Revision 2f727f50f620f44f25ecb615767dc8611f64c988 authored by Linus Torvalds on 12 March 2014, 22:36:04 UTC, committed by Linus Torvalds on 12 March 2014, 22:36:04 UTC
Pull sound fixes from Takashi Iwai:
 "A few fixes for ASoC (N810 DT init fix, DPCM error path fix and a
  couple of MFD init fixes), and a fix for a Lenovo laptop.  All small
  and trivial fixes, suitable for rc7"

* tag 'sound-3.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: 88pm860: Fix IO setup
  ASoC: si476x: Fix IO setup
  ALSA: hda - Fix loud click noise with IdeaPad 410Y
  ASoC: pcm: free path list before exiting from error conditions
  ASoC: n810: fix init with DT boot
2 parent s 33807f4 + 5e3a227
Raw File
Tip revision: 2f727f50f620f44f25ecb615767dc8611f64c988 authored by Linus Torvalds on 12 March 2014, 22:36:04 UTC
Merge tag 'sound-3.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Tip revision: 2f727f5
pm-notifier-error-inject.c
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/suspend.h>

#include "notifier-error-inject.h"

static int priority;
module_param(priority, int, 0);
MODULE_PARM_DESC(priority, "specify PM notifier priority");

static struct notifier_err_inject pm_notifier_err_inject = {
	.actions = {
		{ NOTIFIER_ERR_INJECT_ACTION(PM_HIBERNATION_PREPARE) },
		{ NOTIFIER_ERR_INJECT_ACTION(PM_SUSPEND_PREPARE) },
		{ NOTIFIER_ERR_INJECT_ACTION(PM_RESTORE_PREPARE) },
		{}
	}
};

static struct dentry *dir;

static int err_inject_init(void)
{
	int err;

	dir = notifier_err_inject_init("pm", notifier_err_inject_dir,
					&pm_notifier_err_inject, priority);
	if (IS_ERR(dir))
		return PTR_ERR(dir);

	err = register_pm_notifier(&pm_notifier_err_inject.nb);
	if (err)
		debugfs_remove_recursive(dir);

	return err;
}

static void err_inject_exit(void)
{
	unregister_pm_notifier(&pm_notifier_err_inject.nb);
	debugfs_remove_recursive(dir);
}

module_init(err_inject_init);
module_exit(err_inject_exit);

MODULE_DESCRIPTION("PM notifier error injection module");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Akinobu Mita <akinobu.mita@gmail.com>");
back to top