summaryrefslogtreecommitdiff
path: root/src/superio
diff options
context:
space:
mode:
Diffstat (limited to 'src/superio')
-rw-r--r--src/superio/ite/it8661f/superio.c3
-rw-r--r--src/superio/ite/it8671f/superio.c3
-rw-r--r--src/superio/ite/it8673f/superio.c3
-rw-r--r--src/superio/ite/it8705f/superio.c3
-rw-r--r--src/superio/ite/it8712f/superio.c3
-rw-r--r--src/superio/ite/it8716f/superio.c3
-rw-r--r--src/superio/ite/it8718f/superio.c3
-rw-r--r--src/superio/nsc/pc8374/superio.c3
-rw-r--r--src/superio/nsc/pc87309/superio.c3
-rw-r--r--src/superio/nsc/pc87351/superio.c3
-rw-r--r--src/superio/nsc/pc87360/superio.c3
-rw-r--r--src/superio/nsc/pc87366/superio.c3
-rw-r--r--src/superio/nsc/pc87417/superio.c3
-rw-r--r--src/superio/nsc/pc87427/superio.c3
-rw-r--r--src/superio/nsc/pc97307/superio.c3
-rw-r--r--src/superio/nsc/pc97317/superio.c3
-rw-r--r--src/superio/smsc/fdc37m60x/superio.c3
-rw-r--r--src/superio/smsc/lpc47b272/superio.c3
-rw-r--r--src/superio/smsc/lpc47b397/superio.c3
-rw-r--r--src/superio/smsc/lpc47m10x/superio.c3
-rw-r--r--src/superio/smsc/lpc47n217/superio.c3
-rw-r--r--src/superio/via/vt1211/vt1211.c3
-rw-r--r--src/superio/winbond/w83627ehg/superio.c5
-rw-r--r--src/superio/winbond/w83627hf/superio.c5
-rw-r--r--src/superio/winbond/w83627thf/superio.c3
-rw-r--r--src/superio/winbond/w83977f/superio.c3
-rw-r--r--src/superio/winbond/w83977tf/superio.c3
27 files changed, 56 insertions, 29 deletions
diff --git a/src/superio/ite/it8661f/superio.c b/src/superio/ite/it8661f/superio.c
index 4666d21ec5..1acf7e3deb 100644
--- a/src/superio/ite/it8661f/superio.c
+++ b/src/superio/ite/it8661f/superio.c
@@ -23,6 +23,7 @@
#include <device/device.h>
#include <device/pnp.h>
#include <uart8250.h>
+#include <stdlib.h>
#include "chip.h"
#include "it8661f.h"
@@ -72,7 +73,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_ite_it8661f_ops = {
diff --git a/src/superio/ite/it8671f/superio.c b/src/superio/ite/it8671f/superio.c
index 0e00944f46..bc9716374e 100644
--- a/src/superio/ite/it8671f/superio.c
+++ b/src/superio/ite/it8671f/superio.c
@@ -22,6 +22,7 @@
#include <device/pnp.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "it8671f.h"
@@ -77,7 +78,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_ite_it8671f_ops = {
diff --git a/src/superio/ite/it8673f/superio.c b/src/superio/ite/it8673f/superio.c
index 03b9811e4c..12f7fcfc38 100644
--- a/src/superio/ite/it8673f/superio.c
+++ b/src/superio/ite/it8673f/superio.c
@@ -22,6 +22,7 @@
#include <device/pnp.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "it8673f.h"
@@ -79,7 +80,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_ite_it8673f_ops = {
diff --git a/src/superio/ite/it8705f/superio.c b/src/superio/ite/it8705f/superio.c
index f646e5407c..095e39a7df 100644
--- a/src/superio/ite/it8705f/superio.c
+++ b/src/superio/ite/it8705f/superio.c
@@ -23,6 +23,7 @@
#include <device/device.h>
#include <device/pnp.h>
#include <uart8250.h>
+#include <stdlib.h>
#include "chip.h"
#include "it8705f.h"
@@ -80,7 +81,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_ite_it8705f_ops = {
diff --git a/src/superio/ite/it8712f/superio.c b/src/superio/ite/it8712f/superio.c
index c90c900914..cf57c2ecdf 100644
--- a/src/superio/ite/it8712f/superio.c
+++ b/src/superio/ite/it8712f/superio.c
@@ -24,6 +24,7 @@
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <arch/io.h>
+#include <stdlib.h>
#include "chip.h"
#include "it8712f.h"
@@ -134,7 +135,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_ite_it8712f_ops = {
diff --git a/src/superio/ite/it8716f/superio.c b/src/superio/ite/it8716f/superio.c
index 51f2eb4105..63744ddfbc 100644
--- a/src/superio/ite/it8716f/superio.c
+++ b/src/superio/ite/it8716f/superio.c
@@ -27,6 +27,7 @@
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <arch/io.h>
+#include <stdlib.h>
#include "chip.h"
#include "it8716f.h"
@@ -165,7 +166,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info) / sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_ite_it8716f_ops = {
diff --git a/src/superio/ite/it8718f/superio.c b/src/superio/ite/it8718f/superio.c
index e46426ba87..13930f41de 100644
--- a/src/superio/ite/it8718f/superio.c
+++ b/src/superio/ite/it8718f/superio.c
@@ -22,6 +22,7 @@
#include <device/pnp.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "it8718f.h"
@@ -81,7 +82,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_ite_it8718f_ops = {
diff --git a/src/superio/nsc/pc8374/superio.c b/src/superio/nsc/pc8374/superio.c
index ccbd0f2114..0d8854fe83 100644
--- a/src/superio/nsc/pc8374/superio.c
+++ b/src/superio/nsc/pc8374/superio.c
@@ -10,6 +10,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "pc8374.h"
@@ -64,7 +65,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_nsc_pc8374_ops = {
diff --git a/src/superio/nsc/pc87309/superio.c b/src/superio/nsc/pc87309/superio.c
index 92a54556f7..7f98523ad5 100644
--- a/src/superio/nsc/pc87309/superio.c
+++ b/src/superio/nsc/pc87309/superio.c
@@ -23,6 +23,7 @@
#include <device/pnp.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "pc87309.h"
@@ -73,7 +74,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info) / sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_nsc_pc87309_ops = {
diff --git a/src/superio/nsc/pc87351/superio.c b/src/superio/nsc/pc87351/superio.c
index 675b01c40e..c5bdeda7d1 100644
--- a/src/superio/nsc/pc87351/superio.c
+++ b/src/superio/nsc/pc87351/superio.c
@@ -16,6 +16,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "pc87351.h"
@@ -71,7 +72,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_nsc_pc87351_ops = {
diff --git a/src/superio/nsc/pc87360/superio.c b/src/superio/nsc/pc87360/superio.c
index c6dd896d81..a332a27064 100644
--- a/src/superio/nsc/pc87360/superio.c
+++ b/src/superio/nsc/pc87360/superio.c
@@ -10,6 +10,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "pc87360.h"
@@ -67,7 +68,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_nsc_pc87360_ops = {
diff --git a/src/superio/nsc/pc87366/superio.c b/src/superio/nsc/pc87366/superio.c
index 1bec4100f8..03cc6a9863 100644
--- a/src/superio/nsc/pc87366/superio.c
+++ b/src/superio/nsc/pc87366/superio.c
@@ -10,6 +10,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "pc87366.h"
@@ -67,7 +68,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_nsc_pc87366_ops = {
diff --git a/src/superio/nsc/pc87417/superio.c b/src/superio/nsc/pc87417/superio.c
index 364bbc32f7..1eea29d0ca 100644
--- a/src/superio/nsc/pc87417/superio.c
+++ b/src/superio/nsc/pc87417/superio.c
@@ -12,6 +12,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "pc87417.h"
@@ -68,7 +69,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_nsc_pc87417_ops = {
diff --git a/src/superio/nsc/pc87427/superio.c b/src/superio/nsc/pc87427/superio.c
index 0363a9e18f..b8fe32c2e3 100644
--- a/src/superio/nsc/pc87427/superio.c
+++ b/src/superio/nsc/pc87427/superio.c
@@ -8,6 +8,7 @@
#include <console/console.h>
#include <string.h>
#include <bitops.h>
+#include <stdlib.h>
#include "chip.h"
#include "pc87427.h"
@@ -68,7 +69,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_nsc_pc87427_ops = {
diff --git a/src/superio/nsc/pc97307/superio.c b/src/superio/nsc/pc97307/superio.c
index db954c9a0c..5b75943f26 100644
--- a/src/superio/nsc/pc97307/superio.c
+++ b/src/superio/nsc/pc97307/superio.c
@@ -5,6 +5,7 @@
#include <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
+#include <stdlib.h>
#include "chip.h"
#include "pc97307.h"
@@ -79,7 +80,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_nsc_pc97307_ops = {
diff --git a/src/superio/nsc/pc97317/superio.c b/src/superio/nsc/pc97317/superio.c
index 052e122a79..7945564bf3 100644
--- a/src/superio/nsc/pc97317/superio.c
+++ b/src/superio/nsc/pc97317/superio.c
@@ -5,6 +5,7 @@
#include <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
+#include <stdlib.h>
#include "chip.h"
#include "pc97317.h"
@@ -81,7 +82,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_nsc_pc97317_ops = {
diff --git a/src/superio/smsc/fdc37m60x/superio.c b/src/superio/smsc/fdc37m60x/superio.c
index 33d8587b59..716cb8b2cb 100644
--- a/src/superio/smsc/fdc37m60x/superio.c
+++ b/src/superio/smsc/fdc37m60x/superio.c
@@ -22,6 +22,7 @@
#include <device/pnp.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "fdc37m60x.h"
@@ -77,7 +78,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_smsc_fdc37m60x_ops = {
diff --git a/src/superio/smsc/lpc47b272/superio.c b/src/superio/smsc/lpc47b272/superio.c
index 6c3d97d6f5..e8fc7bddb0 100644
--- a/src/superio/smsc/lpc47b272/superio.c
+++ b/src/superio/smsc/lpc47b272/superio.c
@@ -32,6 +32,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "lpc47b272.h"
@@ -84,7 +85,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(device_t dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]),
+ ARRAY_SIZE(pnp_dev_info),
pnp_dev_info);
}
diff --git a/src/superio/smsc/lpc47b397/superio.c b/src/superio/smsc/lpc47b397/superio.c
index 6400b03c37..e1dafc918a 100644
--- a/src/superio/smsc/lpc47b397/superio.c
+++ b/src/superio/smsc/lpc47b397/superio.c
@@ -14,6 +14,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "lpc47b397.h"
@@ -207,7 +208,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_smsc_lpc47b397_ops = {
diff --git a/src/superio/smsc/lpc47m10x/superio.c b/src/superio/smsc/lpc47m10x/superio.c
index 89d086401c..ec72beaa34 100644
--- a/src/superio/smsc/lpc47m10x/superio.c
+++ b/src/superio/smsc/lpc47m10x/superio.c
@@ -31,6 +31,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "lpc47m10x.h"
@@ -82,7 +83,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(device_t dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]),
+ ARRAY_SIZE(pnp_dev_info),
pnp_dev_info);
}
diff --git a/src/superio/smsc/lpc47n217/superio.c b/src/superio/smsc/lpc47n217/superio.c
index 06c026509f..3c0056cb70 100644
--- a/src/superio/smsc/lpc47n217/superio.c
+++ b/src/superio/smsc/lpc47n217/superio.c
@@ -33,6 +33,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <assert.h>
+#include <stdlib.h>
#include "chip.h"
#include "lpc47n217.h"
@@ -86,7 +87,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(device_t dev)
{
pnp_enable_devices(dev, &pnp_ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]),
+ ARRAY_SIZE(pnp_dev_info),
pnp_dev_info);
}
diff --git a/src/superio/via/vt1211/vt1211.c b/src/superio/via/vt1211/vt1211.c
index 49e11ce039..be29c76e67 100644
--- a/src/superio/via/vt1211/vt1211.c
+++ b/src/superio/via/vt1211/vt1211.c
@@ -26,6 +26,7 @@
#include <device/device.h>
#include <device/pnp.h>
#include <uart8250.h>
+#include <stdlib.h>
#include "vt1211.h"
#include "chip.h"
@@ -212,7 +213,7 @@ static void enable_dev(struct device *dev)
printk_debug("vt1211 enabling PNP devices.\n");
pnp_enable_devices(dev,
&ops,
- sizeof(pnp_dev_info) / sizeof(pnp_dev_info[0]),
+ ARRAY_SIZE(pnp_dev_info),
pnp_dev_info);
}
diff --git a/src/superio/winbond/w83627ehg/superio.c b/src/superio/winbond/w83627ehg/superio.c
index 019f510358..d12bb67be3 100644
--- a/src/superio/winbond/w83627ehg/superio.c
+++ b/src/superio/winbond/w83627ehg/superio.c
@@ -30,6 +30,7 @@
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <pc80/mc146818rtc.h>
+#include <stdlib.h>
#include "chip.h"
#include "w83627ehg.h"
@@ -93,7 +94,7 @@ static void init_hwm(unsigned long base)
0x48, 0x7f, 0x2a, /* Set SMBus base to 0x54 >> 1. */
};
- for(i = 0; i < sizeof(hwm_reg_values)/sizeof(hwm_reg_values[0]); i += 3) {
+ for(i = 0; i < ARRAY_SIZE(hwm_reg_values); i += 3) {
reg = hwm_reg_values[i];
value = pnp_read_index(base, reg);
value &= 0xff & (~(hwm_reg_values[i + 1]));
@@ -200,7 +201,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_winbond_w83627ehg_ops = {
diff --git a/src/superio/winbond/w83627hf/superio.c b/src/superio/winbond/w83627hf/superio.c
index 93c5f6dac2..5f26768adf 100644
--- a/src/superio/winbond/w83627hf/superio.c
+++ b/src/superio/winbond/w83627hf/superio.c
@@ -13,6 +13,7 @@
#include <uart8250.h>
#include <pc80/keyboard.h>
#include <pc80/mc146818rtc.h>
+#include <stdlib.h>
#include "chip.h"
#include "w83627hf.h"
@@ -83,7 +84,7 @@ static void init_hwm(unsigned long base)
};
- for(i = 0; i< sizeof(hwm_reg_values)/sizeof(hwm_reg_values[0]); i+=3 ) {
+ for(i = 0; i< ARRAY_SIZE(hwm_reg_values); i+=3 ) {
reg = hwm_reg_values[i];
value = pnp_read_index(base, reg);
value &= 0xff & hwm_reg_values[i+1];
@@ -189,7 +190,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_winbond_w83627hf_ops = {
diff --git a/src/superio/winbond/w83627thf/superio.c b/src/superio/winbond/w83627thf/superio.c
index 6b08f8746c..28fd72f6df 100644
--- a/src/superio/winbond/w83627thf/superio.c
+++ b/src/superio/winbond/w83627thf/superio.c
@@ -12,6 +12,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "w83627thf.h"
@@ -101,7 +102,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(device_t dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_winbond_w83627thf_ops = {
diff --git a/src/superio/winbond/w83977f/superio.c b/src/superio/winbond/w83977f/superio.c
index 417fee8058..64cdc5da1a 100644
--- a/src/superio/winbond/w83977f/superio.c
+++ b/src/superio/winbond/w83977f/superio.c
@@ -26,6 +26,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "w83977f.h"
@@ -109,7 +110,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(device_t dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_winbond_w83977f_ops = {
diff --git a/src/superio/winbond/w83977tf/superio.c b/src/superio/winbond/w83977tf/superio.c
index e7d155a701..fca98ca59e 100644
--- a/src/superio/winbond/w83977tf/superio.c
+++ b/src/superio/winbond/w83977tf/superio.c
@@ -19,6 +19,7 @@
#include <bitops.h>
#include <uart8250.h>
#include <pc80/keyboard.h>
+#include <stdlib.h>
#include "chip.h"
#include "w83977tf.h"
@@ -105,7 +106,7 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(device_t dev)
{
pnp_enable_devices(dev, &ops,
- sizeof(pnp_dev_info)/sizeof(pnp_dev_info[0]), pnp_dev_info);
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations superio_winbond_w83977tf_ops = {