The patch titled vesafb: Fix return code of vesafb_setcolreg has been added to the -mm tree. Its filename is vesafb-fix-return-code-of-vesafb_setcolreg.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: "Antonino A. Daplas" <adaplas@xxxxxxxxx> If the hardware palette cannot be accessed, make vesafb_setcolreg return a nonzero value. Signed-off-by: Antonino Daplas <adaplas@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/video/vesafb.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff -puN drivers/video/vesafb.c~vesafb-fix-return-code-of-vesafb_setcolreg drivers/video/vesafb.c --- 25/drivers/video/vesafb.c~vesafb-fix-return-code-of-vesafb_setcolreg Tue May 9 12:53:25 2006 +++ 25-akpm/drivers/video/vesafb.c Tue May 9 12:53:25 2006 @@ -80,10 +80,11 @@ static int vesafb_pan_display(struct fb_ return 0; } -static void vesa_setpalette(int regno, unsigned red, unsigned green, +static int vesa_setpalette(int regno, unsigned red, unsigned green, unsigned blue) { int shift = 16 - depth; + int err = -EINVAL; #ifdef __i386__ struct { u_char blue, green, red, pad; } entry; @@ -102,7 +103,7 @@ static void vesa_setpalette(int regno, u "d" (regno), /* EDX */ "D" (&entry), /* EDI */ "S" (&pmi_pal)); /* ESI */ - return; + err = 0; } #endif @@ -110,18 +111,23 @@ static void vesa_setpalette(int regno, u * without protected mode interface and if VGA compatible, * try VGA registers... */ - if (vga_compat) { + if (err && vga_compat) { outb_p(regno, dac_reg); outb_p(red >> shift, dac_val); outb_p(green >> shift, dac_val); outb_p(blue >> shift, dac_val); + err = 0; } + + return err; } static int vesafb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info) { + int err = 0; + /* * Set a single color register. The values supplied are * already rounded down to the hardware's capabilities @@ -133,7 +139,7 @@ static int vesafb_setcolreg(unsigned reg return 1; if (info->var.bits_per_pixel == 8) - vesa_setpalette(regno,red,green,blue); + err = vesa_setpalette(regno,red,green,blue); else if (regno < 16) { switch (info->var.bits_per_pixel) { case 16: @@ -164,7 +170,7 @@ static int vesafb_setcolreg(unsigned reg } } - return 0; + return err; } static struct fb_ops vesafb_ops = { _ Patches currently in -mm which might be from adaplas@xxxxxxxxx are origin.patch savagefb-allocate-space-for-current-and-saved-register.patch savagefb-add-state-save-and_restore-hooks.patch savagefb-add-state-save-and_restore-hooks-fix.patch fbdev-more-accurate-sync-range-extrapolation.patch nvidiafb-revise-pci_device_id-table.patch atyfb-fix-hardware-cursor-handling.patch atyfb-remove-unneeded-calls-to-wait_for_idle.patch atyfb-set-correct-acceleration-flags.patch epson1355fb-update-platform-code.patch vesafb-update-platform-code.patch vfb-update-platform-code.patch vga16fb-update-platform-code.patch fbdev-static-pseudocolor-with-depth-less-than-4-does.patch savagefb-whitespace-cleanup.patch fbdev-firmware-edid-fixes.patch nvidiafb-add-support-for-geforce-6100-and-related-chipsets.patch intelfb-use-firmware-edid-for-mode-database.patch vesafb-fix-return-code-of-vesafb_setcolreg.patch vesafb-prefer-vga-registers-over-pmi.patch atyfb-fix-dead-code.patch fbdev-coverity-bug-85.patch fbdev-coverity-bug-90.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html