Revert "test_firmware: Test platform fw loading on non-EFI systems"
This reverts commit2d38dbf89a
as it broke the build in linux-next Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes:2d38dbf89a
("test_firmware: Test platform fw loading on non-EFI systems") Cc: stable@vger.kernel.org Cc: Scott Branden <scott.branden@broadcom.com> Cc: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20200727165539.0e8797ab@canb.auug.org.au Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -14,22 +14,11 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <crypto/sha.h>
|
||||
|
||||
#include "embedded-firmware.h"
|
||||
|
||||
#ifdef CONFIG_TEST_FIRMWARE
|
||||
# define EFI_EMBEDDED_FW_VISIBILITY
|
||||
#else
|
||||
# define EFI_EMBEDDED_FW_VISIBILITY static
|
||||
#endif
|
||||
|
||||
EFI_EMBEDDED_FW_VISIBILITY LIST_HEAD(efi_embedded_fw_list);
|
||||
EFI_EMBEDDED_FW_VISIBILITY bool efi_embedded_fw_checked;
|
||||
|
||||
/* Exported for use by lib/test_firmware.c only */
|
||||
#ifdef CONFIG_TEST_FIRMWARE
|
||||
LIST_HEAD(efi_embedded_fw_list);
|
||||
EXPORT_SYMBOL_GPL(efi_embedded_fw_list);
|
||||
EXPORT_SYMBOL_GPL(efi_embedded_fw_checked);
|
||||
#endif
|
||||
|
||||
static bool checked_for_fw;
|
||||
|
||||
static const struct dmi_system_id * const embedded_fw_table[] = {
|
||||
#ifdef CONFIG_TOUCHSCREEN_DMI
|
||||
@@ -130,14 +119,14 @@ void __init efi_check_for_embedded_firmwares(void)
|
||||
}
|
||||
}
|
||||
|
||||
efi_embedded_fw_checked = true;
|
||||
checked_for_fw = true;
|
||||
}
|
||||
|
||||
int efi_get_embedded_fw(const char *name, const u8 **data, size_t *size)
|
||||
{
|
||||
struct efi_embedded_fw *iter, *fw = NULL;
|
||||
|
||||
if (!efi_embedded_fw_checked) {
|
||||
if (!checked_for_fw) {
|
||||
pr_warn("Warning %s called while we did not check for embedded fw\n",
|
||||
__func__);
|
||||
return -ENOENT;
|
||||
|
Reference in New Issue
Block a user