diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-09-03 11:12:53 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-09-03 11:12:53 -0700 |
| commit | e46674c847e156b1d4f485120a3d92fcaa5ce6e5 (patch) | |
| tree | 1d812b58b8ac73413162feb6cfe3613deea78d2b /include/linux/blkdev.h | |
| parent | 5eebb6f205162c0a7b0075e8d86453f81994aa2f (diff) | |
[PATCH] MODULE_ALIAS() in block devices
From: Rusty Russell <rusty@rustcorp.com.au>
Previously, default aliases were hardwired into modutils. Now they should
be inside the modules, using MODULE_ALIAS() (they will be overridden by any
user alias).
Diffstat (limited to 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 99dbf0d24eaf..9c7e6d86e810 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -12,6 +12,8 @@ #include <linux/wait.h> #include <linux/mempool.h> #include <linux/bio.h> +#include <linux/module.h> +#include <linux/stringify.h> #include <asm/scatterlist.h> @@ -671,6 +673,11 @@ void kblockd_flush(void); } \ ) #endif - + +#define MODULE_ALIAS_BLOCKDEV(major,minor) \ + MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) +#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \ + MODULE_ALIAS("block-major-" __stringify(major) "-*") + #endif |
