Commit 111c1587 authored by Marc Dietrich's avatar Marc Dietrich Committed by Greg Kroah-Hartman

staging: nvec: implement unregistering of notifiers

This implements the unregistering of notifiers so kernel modules
can be unloaded.
Signed-off-by: default avatarMarc Dietrich <marvin24@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 99758dec
...@@ -123,6 +123,20 @@ int nvec_register_notifier(struct nvec_chip *nvec, struct notifier_block *nb, ...@@ -123,6 +123,20 @@ int nvec_register_notifier(struct nvec_chip *nvec, struct notifier_block *nb,
} }
EXPORT_SYMBOL_GPL(nvec_register_notifier); EXPORT_SYMBOL_GPL(nvec_register_notifier);
/**
* nvec_unregister_notifier - Unregister a notifier with nvec
* @nvec: A &struct nvec_chip
* @nb: The notifier block to unregister
*
* Unregisters a notifier with @nvec. The notifier will be removed from the
* atomic notifier chain.
*/
int nvec_unregister_notifier(struct nvec_chip *nvec, struct notifier_block *nb)
{
return atomic_notifier_chain_unregister(&nvec->notifier_list, nb);
}
EXPORT_SYMBOL_GPL(nvec_unregister_notifier);
/** /**
* nvec_status_notifier - The final notifier * nvec_status_notifier - The final notifier
* *
......
...@@ -197,9 +197,8 @@ extern int nvec_register_notifier(struct nvec_chip *nvec, ...@@ -197,9 +197,8 @@ extern int nvec_register_notifier(struct nvec_chip *nvec,
struct notifier_block *nb, struct notifier_block *nb,
unsigned int events); unsigned int events);
extern int nvec_unregister_notifier(struct device *dev, extern int nvec_unregister_notifier(struct nvec_chip *dev,
struct notifier_block *nb, struct notifier_block *nb);
unsigned int events);
extern void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg); extern void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment