From 15d27b15de965043d6f8e23bc7f34386fcd1a772 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Mon, 26 Jul 2021 22:04:47 -0700 Subject: [PATCH] efi: sysfb_efi: fix build when EFI is not set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When # CONFIG_EFI is not set, there are 2 definitions of sysfb_apply_efi_quirks(). The stub from sysfb.h should be used and the __init function from sysfb_efi.c should not be used. ../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’ __init void sysfb_apply_efi_quirks(struct platform_device *pd) ^~~~~~~~~~~~~~~~~~~~~~ In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0: ../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here static inline void sysfb_apply_efi_quirks(struct platform_device *pd) ^~~~~~~~~~~~~~~~~~~~~~ Reviewed-by: Javier Martinez Canillas Fixes: 8633ef82f101 ("drivers/firmware: consolidate EFI framebuffer setup for all arches") Acked-by: Ard Biesheuvel Signed-off-by: Randy Dunlap Cc: Ard Biesheuvel Cc: linux-efi@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Javier Martinez Canillas Cc: Thomas Zimmermann Cc: Mark Brown Cc: linux-next@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210727050447.7339-1-rdunlap@infradead.org --- drivers/firmware/efi/sysfb_efi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_efi.c index f51865e1b876..4c7c9dd7733f 100644 --- a/drivers/firmware/efi/sysfb_efi.c +++ b/drivers/firmware/efi/sysfb_efi.c @@ -332,6 +332,7 @@ static const struct fwnode_operations efifb_fwnode_ops = { .add_links = efifb_add_links, }; +#ifdef CONFIG_EFI static struct fwnode_handle efifb_fwnode; __init void sysfb_apply_efi_quirks(struct platform_device *pd) @@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struct platform_device *pd) pd->dev.fwnode = &efifb_fwnode; } } +#endif