Skip to content

Commit 355b151

Browse files
hkallweitAndi Shyti
authored andcommitted
i2c: i801: Annotate apanel_addr as __ro_after_init
Annotate this variable as __ro_after_init to protect it from being overwritten later. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
1 parent 073e58b commit 355b151

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-i801.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ static const struct pci_device_id i801_ids[] = {
10601060
MODULE_DEVICE_TABLE(pci, i801_ids);
10611061

10621062
#if defined CONFIG_X86 && defined CONFIG_DMI
1063-
static unsigned char apanel_addr;
1063+
static unsigned char apanel_addr __ro_after_init;
10641064

10651065
/* Scan the system ROM for the signature "FJKEYINF" */
10661066
static __init const void __iomem *bios_signature(const void __iomem *bios)

0 commit comments

Comments
 (0)