summaryrefslogtreecommitdiff
path: root/include/linux/miscdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/miscdevice.h')
-rw-r--r--include/linux/miscdevice.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 159f8ab3df80..23b095889111 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -1,5 +1,7 @@
#ifndef _LINUX_MISCDEVICE_H
#define _LINUX_MISCDEVICE_H
+#include <linux/module.h>
+#include <linux/major.h>
#define BUSMOUSE_MINOR 0
#define PSMOUSE_MINOR 1
@@ -48,4 +50,7 @@ struct miscdevice
extern int misc_register(struct miscdevice * misc);
extern int misc_deregister(struct miscdevice * misc);
+#define MODULE_ALIAS_MISCDEV(minor) \
+ MODULE_ALIAS("char-major-" __stringify(MISC_MAJOR) \
+ "-" __stringify(minor))
#endif