summaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1/atl1_hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/atl1/atl1_hw.c')
-rw-r--r--drivers/net/atl1/atl1_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/atl1/atl1_hw.c b/drivers/net/atl1/atl1_hw.c
index ef886bdeac13..9d3bd22e3a82 100644
--- a/drivers/net/atl1/atl1_hw.c
+++ b/drivers/net/atl1/atl1_hw.c
@@ -603,7 +603,7 @@ static struct atl1_spi_flash_dev flash_table[] = {
static void atl1_init_flash_opcode(struct atl1_hw *hw)
{
- if (hw->flash_vendor >= sizeof(flash_table) / sizeof(flash_table[0]))
+ if (hw->flash_vendor >= ARRAY_SIZE(flash_table))
hw->flash_vendor = 0; /* ATMEL */
/* Init OP table */