]> git.baikalelectronics.ru Git - kernel.git/commit
firmware loader: cancel uncache work before caching firmware
authorMing Lei <ming.lei@canonical.com>
Tue, 9 Oct 2012 04:01:01 +0000 (12:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 15:37:16 +0000 (08:37 -0700)
commitbc20a4e94a45cd439c667dfdf555bd8dabcab536
treee81c57ff5959628e61e93ff62f13a1b5151cd1b7
parent6ab66186695d33c81b559545154047cd3436b033
firmware loader: cancel uncache work before caching firmware

Under 'Opportunistic sleep' situation, system sleep might be
triggered very frequently, so the uncahce work may not be completed
before caching firmware during next suspend.

This patch cancels the uncache work before caching firmware to
fix the problem above.

Also this patch optimizes the cacheing firmware mechanism a bit by
only storing one firmware cache entry for one firmware image.

So if the firmware is still cached during suspend, it doesn't need
to be loaded from user space any more.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_class.c