summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2005-09-29 00:07:29 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-29 08:46:26 -0700
commit775b048d09c85d87a65a7ccd9c4f9372953a5d95 (patch)
treeebe25d3a9296bf38368116c82a5adae2fc167af9 /drivers/video
parent87e0f3dbd3693bc4583474ab191cbdd5e3d9d0fa (diff)
[PATCH] cyblafb: portability fixes, sanitized work with pointers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Knut Petersen <Knut_Petersen@t-online.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/cyblafb.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/video/cyblafb.c b/drivers/video/cyblafb.c
index ae2762cb560..6992100a508 100644
--- a/drivers/video/cyblafb.c
+++ b/drivers/video/cyblafb.c
@@ -410,20 +410,21 @@ static void cyblafb_imageblit(struct fb_info *info,
out32(GE0C,point(image->dx+image->width-1,image->dy+image->height-1));
while(index < index_end) {
+ const char *p = image->data + index;
for(i=0;i<width_dds;i++) {
- out32(GE9C,*((u32*) ((u32)image->data + index)));
+ out32(GE9C,*(u32*)p);
+ p+=4;
index+=4;
}
switch(width_dbs) {
case 0: break;
- case 8: out32(GE9C,*((u8*)((u32)image->data+index)));
+ case 8: out32(GE9C,*(u8*)p);
index+=1;
break;
- case 16: out32(GE9C,*((u16*)((u32)image->data+index)));
+ case 16: out32(GE9C,*(u16*)p);
index+=2;
break;
- case 24: out32(GE9C,(u32)(*((u16*)((u32)image->data+index))) |
- (u32)(*((u8*)((u32)image->data+index+2)))<<16);
+ case 24: out32(GE9C,*(u16*)p | *(u8*)(p+2)<<16);
index+=3;
break;
}