Commit 15d27b15 authored by Randy Dunlap's avatar Randy Dunlap Committed by Daniel Vetter

efi: sysfb_efi: fix build when EFI is not set

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: default avatarJavier Martinez Canillas <javierm@redhat.com>
Fixes: 8633ef82 ("drivers/firmware: consolidate EFI framebuffer setup for all arches")
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-efi@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-next@vger.kernel.org
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210727050447.7339-1-rdunlap@infradead.org
parent 71260b9a
...@@ -332,6 +332,7 @@ static const struct fwnode_operations efifb_fwnode_ops = { ...@@ -332,6 +332,7 @@ static const struct fwnode_operations efifb_fwnode_ops = {
.add_links = efifb_add_links, .add_links = efifb_add_links,
}; };
#ifdef CONFIG_EFI
static struct fwnode_handle efifb_fwnode; static struct fwnode_handle efifb_fwnode;
__init void sysfb_apply_efi_quirks(struct platform_device *pd) __init void sysfb_apply_efi_quirks(struct platform_device *pd)
...@@ -354,3 +355,4 @@ __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; pd->dev.fwnode = &efifb_fwnode;
} }
} }
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment