From 006e8575825955af5dc89bb85fabf0d9e16f4abe Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 8 Jul 2008 19:00:18 +0200 Subject: [PATCH] --- yaml --- r: 104851 b: refs/heads/master c: df648c9fbebb4de50e7a6e76cc253c7cb0421f9b h: refs/heads/master i: 104849: 3321a086d1b6e52834a9ac8c6cacd5fb2bd3813b 104847: ccda40b5375bd1b970e526f5a34bc919180e6a51 v: v3 --- [refs] | 2 +- trunk/include/linux/kmod.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 4e1fa01f4cf4..1e114c02840f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a81792f668c20540c336af4242ba1400763eb14f +refs/heads/master: df648c9fbebb4de50e7a6e76cc253c7cb0421f9b diff --git a/trunk/include/linux/kmod.h b/trunk/include/linux/kmod.h index 5dc13848891b..9bdb28d6660f 100644 --- a/trunk/include/linux/kmod.h +++ b/trunk/include/linux/kmod.h @@ -29,11 +29,12 @@ /* modprobe exit status on success, -ve on error. Return value * usually useless though. */ extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); +#define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x))) #else static inline int request_module(const char * name, ...) { return -ENOSYS; } +#define try_then_request_module(x, mod...) (x) #endif -#define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x))) struct key; struct file;