blob: 3dee18afc631995fd41c73296e166f54f76563fb [file] [log] [blame]
/*
* sound/soc/amlogic/common/notify.c
*
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*/
#undef pr_fmt
#define pr_fmt(fmt) "snd_notify: " fmt
#include <linux/module.h>
static BLOCKING_NOTIFIER_HEAD(aout_notifier_list);
/*
* aout_register_client - register a client notifier
* @nb: notifier block to callback on events
*/
int aout_register_client(struct notifier_block *nb)
{
return blocking_notifier_chain_register(&aout_notifier_list, nb);
}
EXPORT_SYMBOL(aout_register_client);
/*
* aout_unregister_client - unregister a client notifier
* @nb: notifier block to callback on events
*/
int aout_unregister_client(struct notifier_block *nb)
{
return blocking_notifier_chain_unregister(&aout_notifier_list, nb);
}
EXPORT_SYMBOL(aout_unregister_client);
/*
* aout_notifier_call_chain - notify clients of fb_events
*
*/
int aout_notifier_call_chain(unsigned long val, void *v)
{
return blocking_notifier_call_chain(&aout_notifier_list, val, v);
}
EXPORT_SYMBOL_GPL(aout_notifier_call_chain);