firmware_class: Rework usermodehelper check
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 28 Mar 2012 21:29:45 +0000 (23:29 +0200)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 13:07:23 +0000 (18:07 +0530)
commit86e70ab71197242fd8197ae8ba015fda0b8e3f84
tree9b76fa9e276cd8edf561a3dfd7d6ce09288b9b40
parentc6564361fa984c39bf00acebd1aecdfc11840929
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
drivers/base/firmware_class.c
include/linux/kmod.h
kernel/kmod.c