diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-07-02 15:29:18 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-07-14 20:28:08 +0200 |
commit | 25d283e53880072cc4d3398ff72ff8b2efb2b079 (patch) | |
tree | 6a862131080a3d998510750e81bbd43d3fe7826f /drivers | |
parent | 309788aa64c083b8294f083e286cba9334d42744 (diff) | |
download | barebox-25d283e53880072cc4d3398ff72ff8b2efb2b079.tar.gz barebox-25d283e53880072cc4d3398ff72ff8b2efb2b079.tar.xz |
mfd: superio: smsc: fix C99ism initial declaration in for loop
Codebase is meant to be gnu89, but was only enforced starting
with bc4840e98b94 ("kbuild: add -Wmissing-prototypes and -std=gnu89
to KBUILD_HOSTCFLAGS"). Since then, this driver no longer compiles.
Fix this.
Fixes: eaf020f1bb52 ("mfd: superio: add base SMSC MFD driver")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/smsc-superio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mfd/smsc-superio.c b/drivers/mfd/smsc-superio.c index 349c878cef..ff83aa1a44 100644 --- a/drivers/mfd/smsc-superio.c +++ b/drivers/mfd/smsc-superio.c @@ -106,8 +106,9 @@ static void smsc_superio_find(u16 sioaddr, u16 id_reg) static int smsc_superio_detect(void) { u16 ports[] = { 0x2e, 0x4e, 0x162e, 0x164e, 0x3f0, 0x370 }; + int i; - for (int i = 0; i < ARRAY_SIZE(ports); i++) + for (i = 0; i < ARRAY_SIZE(ports); i++) smsc_superio_find(ports[i], SIO_REG_DEVID); return 0; |