]> git.karo-electronics.de Git - karo-tx-linux.git/commit
firmware_class: Rework usermodehelper check
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 28 Mar 2012 21:29:45 +0000 (23:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 16:13:53 +0000 (09:13 -0700)
commit1cbfac52d7ccb45e3a3ea1941ed626997143456c
tree6d8fdadcc08a4869815c3024e63be7a704ea74eb
parentbff4969b619c9a78356eaad56a3d6f4d1ea3a87f
firmware_class: Rework usermodehelper check

commit fe2e39d8782d885755139304d8dba0b3e5bfa878 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_class.c
include/linux/kmod.h
kernel/kmod.c