]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/console/fbcon_rotate.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / drivers / video / console / fbcon_rotate.h
index e504fbf5c6045bedb1319d76f968b0c4e425007f..75be5ce53dc541f74b15d014b2e652d6a627664c 100644 (file)
@@ -11,8 +11,6 @@
 #ifndef _FBCON_ROTATE_H
 #define _FBCON_ROTATE_H
 
-#define FNTCHARCNT(fd) (((int *)(fd))[-3])
-
 #define GETVYRES(s,i) ({                           \
         (s == SCROLL_REDRAW || s == SCROLL_MOVE) ? \
         (i)->var.yres : (i)->var.yres_virtual; })
         (s == SCROLL_REDRAW || s == SCROLL_MOVE || !(i)->fix.xpanstep) ? \
         (i)->var.xres : (i)->var.xres_virtual; })
 
-/*
- * The bitmap is always big endian
- */
-#if defined(__LITTLE_ENDIAN)
-#define FBCON_BIT(b) (7 - (b))
-#else
-#define FBCON_BIT(b) (b)
-#endif
 
 static inline int pattern_test_bit(u32 x, u32 y, u32 pitch, const char *pat)
 {
        u32 tmp = (y * pitch) + x, index = tmp / 8,  bit = tmp % 8;
 
        pat +=index;
-       return (test_bit(FBCON_BIT(bit), (void *)pat));
+       return (*pat) & (0x80 >> bit);
 }
 
 static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat)
@@ -43,7 +33,8 @@ static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat)
        u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8;
 
        pat += index;
-       set_bit(FBCON_BIT(bit), (void *)pat);
+
+       (*pat) |= 0x80 >> bit;
 }
 
 static inline void rotate_ud(const char *in, char *out, u32 width, u32 height)