OSDN Git Service

firmware_loader: formalize built-in firmware API
authorLuis Chamberlain <mcgrof@kernel.org>
Thu, 21 Oct 2021 15:58:34 +0000 (08:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Oct 2021 12:13:44 +0000 (14:13 +0200)
commit48d09e97876bed4bcc503d528bdba8c907e43cb3
tree19c98782f93da87cf9e1b2c6a0ac817e0c9fa9bf
parentc87761db2100677a69be551365105125d872af5b
firmware_loader: formalize built-in firmware API

Formalize the built-in firmware with a proper API. This can later
be used by other callers where all they need is built-in firmware.

We export the firmware_request_builtin() call for now only
under the TEST_FIRMWARE symbol namespace as there are no
direct modular users for it. If they pop up they are free
to export it generally. Built-in code always gets access to
the callers and we'll demonstrate a hidden user which has been
lurking in the kernel for a while and the reason why using a
proper API was better long term.

Reviewed-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20211021155843.1969401-2-mcgrof@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_loader/builtin/Makefile
drivers/base/firmware_loader/builtin/main.c [new file with mode: 0644]
drivers/base/firmware_loader/firmware.h
drivers/base/firmware_loader/main.c
include/linux/firmware.h