[PATCH] w1-eeprom: Make use of static keyword in drivers
Tom Rini
trini at konsulko.com
Fri Sep 26 17:31:48 CEST 2025
Both the ds24xxx and ds2502 have a family_supported array which is local
to the driver but was not marked as static. Mark this as static as both
best practice and to allow both to be built in "allyesconfig" for
example.
Signed-off-by: Tom Rini <trini at konsulko.com>
---
drivers/w1-eeprom/ds24xxx.c | 2 +-
drivers/w1-eeprom/ds2502.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/w1-eeprom/ds24xxx.c b/drivers/w1-eeprom/ds24xxx.c
index 413d8bc58814..801fade6f495 100644
--- a/drivers/w1-eeprom/ds24xxx.c
+++ b/drivers/w1-eeprom/ds24xxx.c
@@ -53,7 +53,7 @@ U_BOOT_DRIVER(ds24xxx) = {
.probe = ds24xxx_probe,
};
-u8 family_supported[] = {
+static u8 family_supported[] = {
W1_FAMILY_DS24B33,
W1_FAMILY_DS2431,
};
diff --git a/drivers/w1-eeprom/ds2502.c b/drivers/w1-eeprom/ds2502.c
index db9f41e97269..981b41a34b2b 100644
--- a/drivers/w1-eeprom/ds2502.c
+++ b/drivers/w1-eeprom/ds2502.c
@@ -243,7 +243,7 @@ U_BOOT_DRIVER(ds2502) = {
.probe = ds2502_probe,
};
-u8 family_supported[] = {
+static u8 family_supported[] = {
W1_FAMILY_DS2502,
};
--
2.43.0
More information about the U-Boot
mailing list