aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/miscdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/miscdevice.h')
-rw-r--r--include/linux/miscdevice.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index dff9ea32606a..24b30b9b4f8a 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -43,7 +43,15 @@ struct miscdevice {
43}; 43};
44 44
45extern int misc_register(struct miscdevice * misc); 45extern int misc_register(struct miscdevice * misc);
46extern int misc_deregister(struct miscdevice * misc); 46extern int __misc_deregister(struct miscdevice *misc, bool suspended);
47static inline int misc_deregister(struct miscdevice *misc)
48{
49 return __misc_deregister(misc, false);
50}
51static inline int misc_deregister_suspended(struct miscdevice *misc)
52{
53 return __misc_deregister(misc, true);
54}
47 55
48#define MODULE_ALIAS_MISCDEV(minor) \ 56#define MODULE_ALIAS_MISCDEV(minor) \
49 MODULE_ALIAS("char-major-" __stringify(MISC_MAJOR) \ 57 MODULE_ALIAS("char-major-" __stringify(MISC_MAJOR) \