firmware: refactor loading status
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Thu, 17 Nov 2016 10:00:48 +0000 (11:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2016 20:28:54 +0000 (21:28 +0100)
commitf52cc379423d61ae370aefe5344c88bc88881043
tree1d7b50e9f4ae10c72ae43cef9d613866236d30d1
parent2e700f8d85975f516ccaad821278c1fe66b2cc98
firmware: refactor loading status

The firmware loader tracks the current state of the loading process
via unsigned long status and a completion in struct
firmware_buf. Instead of open code tracking the state, introduce data
structure which encapsulate the state tracking and synchronization.

While at it also separate UHM states from direct loading states, e.g.
the loading_timeout is only defined when CONFIG_FW_LOADER_USER_HELPER.

Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_class.c