aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/kmod.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 5dc13848891..9bdb28d6660 100644
--- a/include/linux/kmod.h
+++ b/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;