diff options
| author | Felix Blyakher <felixb@sgi.com> | 2009-06-10 18:07:47 -0400 |
|---|---|---|
| committer | Felix Blyakher <felixb@sgi.com> | 2009-06-10 18:07:47 -0400 |
| commit | 4e73e0eb633f8a1b5cbf20e7f42c6dbfec1d1ca7 (patch) | |
| tree | 0cea46e43f0625244c3d06a71d6559e5ec5419ca /include/linux/kmod.h | |
| parent | 4156e735d3abde8e9243b5d22f7999dd3fffab2e (diff) | |
| parent | 07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/kmod.h')
| -rw-r--r-- | include/linux/kmod.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 92213a9194e1..384ca8bbf1ac 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
| @@ -29,10 +29,15 @@ | |||
| 29 | #ifdef CONFIG_MODULES | 29 | #ifdef CONFIG_MODULES |
| 30 | /* modprobe exit status on success, -ve on error. Return value | 30 | /* modprobe exit status on success, -ve on error. Return value |
| 31 | * usually useless though. */ | 31 | * usually useless though. */ |
| 32 | extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); | 32 | extern int __request_module(bool wait, const char *name, ...) \ |
| 33 | #define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x))) | 33 | __attribute__((format(printf, 2, 3))); |
| 34 | #define request_module(mod...) __request_module(true, mod) | ||
| 35 | #define request_module_nowait(mod...) __request_module(false, mod) | ||
| 36 | #define try_then_request_module(x, mod...) \ | ||
| 37 | ((x) ?: (__request_module(true, mod), (x))) | ||
| 34 | #else | 38 | #else |
| 35 | static inline int request_module(const char * name, ...) { return -ENOSYS; } | 39 | static inline int request_module(const char *name, ...) { return -ENOSYS; } |
| 40 | static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; } | ||
| 36 | #define try_then_request_module(x, mod...) (x) | 41 | #define try_then_request_module(x, mod...) (x) |
| 37 | #endif | 42 | #endif |
| 38 | 43 | ||
