Commit fe4914db authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Jens Axboe

[PATCH] Macfb compile fixes

Macfb compile fixes
parent d7790ab3
...@@ -233,11 +233,11 @@ static int dafb_setpalette (unsigned int regno, unsigned int red, ...@@ -233,11 +233,11 @@ static int dafb_setpalette (unsigned int regno, unsigned int red,
/* Loop until we get to the register we want */ /* Loop until we get to the register we want */
for (i = 0; i < regno; i++) { for (i = 0; i < regno; i++) {
nubus_writeb(info->cmap[i].red >> 8, &dafb_cmap_regs->lut); nubus_writeb(info->cmap.red[i] >> 8, &dafb_cmap_regs->lut);
nop(); nop();
nubus_writeb(info->cmap[i].green >> 8, &dafb_cmap_regs->lut); nubus_writeb(info->cmap.green[i] >> 8, &dafb_cmap_regs->lut);
nop(); nop();
nubus_writeb(info->cmap[i].blue >> 8, &dafb_cmap_regs->lut); nubus_writeb(info->cmap.blue[i] >> 8, &dafb_cmap_regs->lut);
nop(); nop();
} }
} }
...@@ -528,10 +528,10 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green, ...@@ -528,10 +528,10 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green,
* != 0 for invalid regno. * != 0 for invalid regno.
*/ */
if (regno >= info->cmap.len) if (regno >= fb_info->cmap.len)
return 1; return 1;
switch (info->var.bits_per_pixel) { switch (fb_info->var.bits_per_pixel) {
case 1: case 1:
/* We shouldn't get here */ /* We shouldn't get here */
break; break;
...@@ -539,21 +539,21 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green, ...@@ -539,21 +539,21 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green,
case 4: case 4:
case 8: case 8:
if (macfb_setpalette) if (macfb_setpalette)
macfb_setpalette(regno, red, green, blue, info); macfb_setpalette(regno, red, green, blue, fb_info);
else else
return 1; return 1;
break; break;
case 16: case 16:
if (info->var.red.offset == 10) { if (fb_info->var.red.offset == 10) {
/* 1:5:5:5 */ /* 1:5:5:5 */
((u32*) (info->pseudo_palette))[regno] = ((u32*) (fb_info->pseudo_palette))[regno] =
((red & 0xf800) >> 1) | ((red & 0xf800) >> 1) |
((green & 0xf800) >> 6) | ((green & 0xf800) >> 6) |
((blue & 0xf800) >> 11) | ((blue & 0xf800) >> 11) |
((transp != 0) << 15); ((transp != 0) << 15);
} else { } else {
/* 0:5:6:5 */ /* 0:5:6:5 */
((u32*) (info->pseudo_palette))[regno] = ((u32*) (fb_info->pseudo_palette))[regno] =
((red & 0xf800) ) | ((red & 0xf800) ) |
((green & 0xfc00) >> 5) | ((green & 0xfc00) >> 5) |
((blue & 0xf800) >> 11); ((blue & 0xf800) >> 11);
...@@ -565,19 +565,19 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green, ...@@ -565,19 +565,19 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green,
red >>= 8; red >>= 8;
green >>= 8; green >>= 8;
blue >>= 8; blue >>= 8;
((u32 *)(info->pseudo_palette))[regno] = ((u32 *)(fb_info->pseudo_palette))[regno] =
(red << info->var.red.offset) | (red << fb_info->var.red.offset) |
(green << info->var.green.offset) | (green << fb_info->var.green.offset) |
(blue << info->var.blue.offset); (blue << fb_info->var.blue.offset);
break; break;
case 32: case 32:
red >>= 8; red >>= 8;
green >>= 8; green >>= 8;
blue >>= 8; blue >>= 8;
((u32 *)(info->pseudo_palette))[regno] = ((u32 *)(fb_info->pseudo_palette))[regno] =
(red << info->var.red.offset) | (red << fb_info->var.red.offset) |
(green << info->var.green.offset) | (green << fb_info->var.green.offset) |
(blue << info->var.blue.offset); (blue << fb_info->var.blue.offset);
break; break;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment