Compile fixes for various fb drivers
PATCH 1/1 Compile fixes for various fb drivers
Hi,
fb_copy_cmap has changed in 2.6.8.1, but the change is not reflected in all drivers, this updates the respective framebuffer drivers.
The patch is against vanilla 2.6.8.1.
kind regards,
Signature · 6 lines
sebas - - - - - - - - - - - http://vizZzion.org ====================== mathematician, n.: Some one who believes imaginary things appear right before your i's.
drivers/video/atafb.c +1 -1
@@ -2539,7 +2539,7 @@ atafb_get_cmap(struct fb_cmap *cmap, intreturn fb_get_cmap (cmap, kspc, fbhw->getcolreg, info); else if (fb_display[con].cmap.len) /* non default colormap ? */ - fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2); + fb_copy_cmap(&fb_display[con].cmap, cmap); else fb_copy_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel), cmap, kspc ? 0 : 2);
drivers/video/cyberfb.c +1 -1
@@ -937,7 +937,7 @@ static int cyberfb_get_cmap(struct fb_cmreturn (fb_get_cmap (cmap, kspc, Cyber_getcolreg, info)); }else if (fb_display[con].cmap.len) {/* non default colormap? */ DPRINTK ("Use console cmap\n" ); -fb_copy_cmap (&fb_display[con].cmap, cmap, kspc ?0 :2 ); +fb_copy_cmap (&fb_display[con].cmap, cmap); }else {DPRINTK ("Use default cmap\n" ); fb_copy_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
drivers/video/retz3fb.c +1 -1
@@ -1277,7 +1277,7 @@ static int retz3fb_get_cmap(struct fb_cmif (con == info->currcon)/* current console? */ return (fb_get_cmap (cmap, kspc, retz3_getcolreg, info));else if (fb_display[con].cmap.len)/* non default colormap? */ -fb_copy_cmap (&fb_display[con].cmap, cmap, kspc ?0 :2 ); +fb_copy_cmap (&fb_display[con].cmap, cmap);else fb_copy_cmap (fb_default_cmap (1 <<fb_display[con].var.bits_per_pixel), cmap, kspc ?0 :2 );
drivers/video/S3triofb.c +1 -1
@@ -220,7 +220,7 @@ static int s3trio_get_cmap(struct fb_cmaif (con == info->currcon)/* current console? */ return fb_get_cmap (cmap, kspc, s3trio_getcolreg, info);else if (fb_display[con].cmap.len)/* non default colormap? */ -fb_copy_cmap (&fb_display[con].cmap, cmap, kspc ?0 :2 ); +fb_copy_cmap (&fb_display[con].cmap, cmap);else fb_copy_cmap (fb_default_cmap (1 << fb_display[con].var.bits_per_pixel), cmap, kspc ?0 :2 );
drivers/video/sis/sis_main.c +3 -3
@@ -1641,12 +1641,12 @@ sisfb_get_cmap(struct fb_cmap *cmap, int }else if (display->cmap.len) { -fb_copy_cmap (&display->cmap, cmap, kspc ?0 :2 ); +fb_copy_cmap (&display->cmap, cmap); }else {int size =sisfb_get_cmap_len (&display->var); -fb_copy_cmap (fb_default_cmap (size), cmap, kspc ?0 :2 ); +fb_copy_cmap (fb_default_cmap (size), cmap); }
@@ -1671,7 +1671,7 @@ sisfb_set_cmap(struct fb_cmap *cmap, intif (con == ivideo->currcon) {return fb_set_cmap (cmap, kspc, sisfb_setcolreg, info); }else { -fb_copy_cmap (cmap, &display->cmap, kspc ?0 :1 ); +fb_copy_cmap (cmap, &display->cmap); }return 0 ;
drivers/video/sun3fb.c +1 -1
@@ -306,7 +306,7 @@ static int sun3fb_get_cmap(struct fb_cmaif (con == info->currcon)/* current console? */ return fb_get_cmap (cmap, kspc, sun3fb_getcolreg, info);else if (fb_display[con].cmap.len)/* non default colormap? */ -fb_copy_cmap (&fb_display[con].cmap, cmap, kspc ?0 :2 ); +fb_copy_cmap (&fb_display[con].cmap, cmap);else fb_copy_cmap (fb_default_cmap (1 <<fb_display[con].var.bits_per_pixel), cmap, kspc ?0 :2 );return 0 ;
drivers/video/virgefb.c +1 -1
@@ -1615,7 +1615,7 @@ static int virgefb_get_cmap(struct fb_cmreturn (fb_get_cmap (cmap, kspc, fbhw->getcolreg, info)); }else if (fb_display[con].cmap.len) {/* non default colormap? */ DPRINTK ("Use console cmap\n" ); -fb_copy_cmap (&fb_display[con].cmap, cmap, kspc ?0 :2 ); +fb_copy_cmap (&fb_display[con].cmap, cmap); }else {DPRINTK ("Use default cmap\n" ); fb_copy_cmap(fb_default_cmap(fb_display[con].var.bits_per_pixel==8 ? 256 : 16),
Quoted 8 lines · Sebastian Kügler
Hi,
fb_copy_cmaphas changed in 2.6.8.1, but the change is not reflected in all drivers, this updates the respective framebuffer drivers.The patch is against vanilla 2.6.8.1.
Signed-off-by Sebastian Kügler <[email protected]>
NAK.
First of all, that compile fix isn't - try to compile these drivers and see if any got fixed by that.
While we are at it, if they would compile, you would have broken them.
Question: what do you think the argument in question was controlling and why would "drop it silently" be a correct fix?
And finally, the reason why these drivers would fail to compile for quite a while has a lot in common with the reason why they call fb_copy_cmap() in the first place - they are trying to provide a method that doesn't exist anymore and calls in question are from the instances of that method. Fixing that is going to remove these calls anyway.