]> git.karo-electronics.de Git - linux-beck.git/commitdiff
fb: fix atyfb build warning
authorRandy Dunlap <rdunlap@infradead.org>
Thu, 20 Jun 2013 02:38:13 +0000 (19:38 -0700)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 26 Jun 2013 12:13:53 +0000 (15:13 +0300)
Fix build warning when neither of CONFIG_FB_ATY_GX or
CONFIG_FB_ATY_CT is enabled, since ARRAY_SIZE(aty_chips) is 0 in
that case.

drivers/video/aty/atyfb_base.c:437:11: warning: overflow in implicit constant conversion [-Woverflow]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-fbdev@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/aty/atyfb_base.c

index 4f27fdc58d8463650fec54d9020496c89810b9bc..813b7d752bed6cc730b2cbf099494519b5476f16 100644 (file)
@@ -434,8 +434,8 @@ static int correct_chipset(struct atyfb_par *par)
        const char *name;
        int i;
 
-       for (i = ARRAY_SIZE(aty_chips) - 1; i >= 0; i--)
-               if (par->pci_id == aty_chips[i].pci_id)
+       for (i = ARRAY_SIZE(aty_chips); i > 0; i--)
+               if (par->pci_id == aty_chips[i - 1].pci_id)
                        break;
 
        if (i < 0)