Skip to content

Commit 15d27b1

Browse files
rddunlapdanvet
authored andcommitted
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: Javier Martinez Canillas <[email protected]> Fixes: 8633ef8 ("drivers/firmware: consolidate EFI framebuffer setup for all arches") Acked-by: Ard Biesheuvel <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Javier Martinez Canillas <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Mark Brown <[email protected]> Cc: [email protected] Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 71260b9 commit 15d27b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/firmware/efi/sysfb_efi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ static const struct fwnode_operations efifb_fwnode_ops = {
332332
.add_links = efifb_add_links,
333333
};
334334

335+
#ifdef CONFIG_EFI
335336
static struct fwnode_handle efifb_fwnode;
336337

337338
__init void sysfb_apply_efi_quirks(struct platform_device *pd)
@@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struct platform_device *pd)
354355
pd->dev.fwnode = &efifb_fwnode;
355356
}
356357
}
358+
#endif

0 commit comments

Comments
 (0)