diff options
Diffstat (limited to 'drivers/video/aty/atyfb_base.c')
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index d790ee76cc70..e799fcca365a 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -434,7 +434,7 @@ static int __devinit correct_chipset(struct atyfb_par *par) | |||
434 | const char *name; | 434 | const char *name; |
435 | int i; | 435 | int i; |
436 | 436 | ||
437 | for (i = sizeof(aty_chips) / sizeof(*aty_chips) - 1; i >= 0; i--) | 437 | for (i = ARRAY_SIZE(aty_chips) - 1; i >= 0; i--) |
438 | if (par->pci_id == aty_chips[i].pci_id) | 438 | if (par->pci_id == aty_chips[i].pci_id) |
439 | break; | 439 | break; |
440 | 440 | ||
@@ -2168,10 +2168,10 @@ static void __init aty_calc_mem_refresh(struct atyfb_par *par, int xclk) | |||
2168 | 2168 | ||
2169 | if (IS_XL(par->pci_id) || IS_MOBILITY(par->pci_id)) { | 2169 | if (IS_XL(par->pci_id) || IS_MOBILITY(par->pci_id)) { |
2170 | refresh_tbl = ragexl_tbl; | 2170 | refresh_tbl = ragexl_tbl; |
2171 | size = sizeof(ragexl_tbl)/sizeof(int); | 2171 | size = ARRAY_SIZE(ragexl_tbl); |
2172 | } else { | 2172 | } else { |
2173 | refresh_tbl = ragepro_tbl; | 2173 | refresh_tbl = ragepro_tbl; |
2174 | size = sizeof(ragepro_tbl)/sizeof(int); | 2174 | size = ARRAY_SIZE(ragepro_tbl); |
2175 | } | 2175 | } |
2176 | 2176 | ||
2177 | for (i=0; i < size; i++) { | 2177 | for (i=0; i < size; i++) { |
@@ -3399,7 +3399,7 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev, const struct pci_devi | |||
3399 | struct atyfb_par *par; | 3399 | struct atyfb_par *par; |
3400 | int i, rc = -ENOMEM; | 3400 | int i, rc = -ENOMEM; |
3401 | 3401 | ||
3402 | for (i = sizeof(aty_chips) / sizeof(*aty_chips) - 1; i >= 0; i--) | 3402 | for (i = ARRAY_SIZE(aty_chips); i >= 0; i--) |
3403 | if (pdev->device == aty_chips[i].pci_id) | 3403 | if (pdev->device == aty_chips[i].pci_id) |
3404 | break; | 3404 | break; |
3405 | 3405 | ||