diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-03-28 17:29:45 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-03-28 17:29:45 -0400 |
commit | fe2e39d8782d885755139304d8dba0b3e5bfa878 (patch) | |
tree | 200fb998fe94b9ccd93d07c59656b8f5ab62c5d7 /include/linux/kmod.h | |
parent | 9a4768d849d28a79566aa37de19b9852d2da8ec4 (diff) |
firmware_class: Rework usermodehelper check
Instead of two functions, read_lock_usermodehelper() and
usermodehelper_is_disabled(), used in combination, introduce
usermodehelper_read_trylock() that will only return with umhelper_sem
held if usermodehelper_disabled is unset (and will return -EAGAIN
otherwise) and make _request_firmware() use it.
Rename read_unlock_usermodehelper() to
usermodehelper_read_unlock() to follow the naming convention of the
new function.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'include/linux/kmod.h')
-rw-r--r-- | include/linux/kmod.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 9efeae679106..97d22c3e08b1 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -114,8 +114,7 @@ extern void usermodehelper_init(void); | |||
114 | 114 | ||
115 | extern int usermodehelper_disable(void); | 115 | extern int usermodehelper_disable(void); |
116 | extern void usermodehelper_enable(void); | 116 | extern void usermodehelper_enable(void); |
117 | extern bool usermodehelper_is_disabled(void); | 117 | extern int usermodehelper_read_trylock(void); |
118 | extern void read_lock_usermodehelper(void); | 118 | extern void usermodehelper_read_unlock(void); |
119 | extern void read_unlock_usermodehelper(void); | ||
120 | 119 | ||
121 | #endif /* __LINUX_KMOD_H__ */ | 120 | #endif /* __LINUX_KMOD_H__ */ |