diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-07-02 10:28:21 +0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-07-29 12:24:41 +0400 |
commit | 8b00e1831cea899cd4dfe04e574c26e376c27368 (patch) | |
tree | 4ba79d180ba07a07220e7a44b3fe1a13deb1abc4 /drivers/video | |
parent | 6d3488a5acc64b79773ada12060babe90c0fb130 (diff) | |
download | linux-8b00e1831cea899cd4dfe04e574c26e376c27368.tar.xz |
fbdev/atyfb: fix recent breakage in correct_chipset()
The 6e36308a6f "fb: fix atyfb build warning" isn't right. It makes all
the indexes off by one. This patch reverts it and casts the
ARRAY_SIZE() to int to silence the build warning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index a89c15de9f45..9b0f12c5c284 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -435,8 +435,8 @@ static int correct_chipset(struct atyfb_par *par) const char *name; int i; - for (i = ARRAY_SIZE(aty_chips); i > 0; i--) - if (par->pci_id == aty_chips[i - 1].pci_id) + for (i = (int)ARRAY_SIZE(aty_chips) - 1; i >= 0; i--) + if (par->pci_id == aty_chips[i].pci_id) break; if (i < 0) |