[PATCH] fixes for aty128fb

From: Paul Mackerras (paulus@samba.org)
Date: Mon Mar 24 2003 - 06:48:16 EST


The patch below fixes a couple of problems in the aty128fb driver: an
include wasn't finding its file, and it needs to access the
pseudo_palette as 32-bit quantities.

Paul.

diff -urN linux-2.5/drivers/video/aty/aty128fb.c linuxppc-2.5/drivers/video/aty/aty128fb.c
--- linux-2.5/drivers/video/aty/aty128fb.c 2003-03-23 16:29:31.000000000 +1100
+++ linuxppc-2.5/drivers/video/aty/aty128fb.c 2003-03-23 21:42:33.000000000 +1100
@@ -62,7 +62,7 @@
 #ifdef CONFIG_ALL_PPC
 #include <asm/prom.h>
 #include <asm/pci-bridge.h>
-#include "macmodes.h"
+#include "../macmodes.h"
 #endif
 
 #ifdef CONFIG_ADB_PMU
@@ -1994,23 +1994,21 @@
 
         if (regno < 16) {
                 int i;
+ u32 *pal = info->pseudo_palette;
+
                 switch (par->crtc.depth) {
                 case 15:
- ((u16 *) (info->pseudo_palette))[regno] =
- (regno << 10) | (regno << 5) | regno;
+ pal[regno] = (regno << 10) | (regno << 5) | regno;
                         break;
                 case 16:
- ((u16 *) (info->pseudo_palette))[regno] =
- (regno << 11) | (regno << 6) | regno;
+ pal[regno] = (regno << 11) | (regno << 6) | regno;
                         break;
                 case 24:
- ((u32 *) (info->pseudo_palette))[regno] =
- (regno << 16) | (regno << 8) | regno;
+ pal[regno] = (regno << 16) | (regno << 8) | regno;
                         break;
                 case 32:
                         i = (regno << 8) | regno;
- ((u32 *) (info->pseudo_palette))[regno] =
- (i << 16) | i;
+ pal[regno] = (i << 16) | i;
                         break;
                 }
         }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:15 EST