Messages in this thread Patch in this message | | | From | Paul Mackerras <> | Date | Thu, 12 Dec 2002 14:45:17 +1100 | Subject | [PATCH] fix offb |
| |
This patch fixes the offb driver, and fixes the Makefile so it doesn't go looking for a nonexistent file (cfbimgblit.o) when CONFIG_FB_OF is turned on. In the offb driver, we were overrunning the end of the info->fix.id field on some cards, plus it had an undefined variable. I guess we could also get rid of the "info->node = NODEV;" line too.
Paul.
diff -urN linux-2.5/drivers/video/Makefile pmac-2.5/drivers/video/Makefile --- linux-2.5/drivers/video/Makefile 2002-12-10 15:20:32.000000000 +1100 +++ pmac-2.5/drivers/video/Makefile 2002-12-10 21:25:36.000000000 +1100 @@ -42,7 +42,7 @@ obj-$(CONFIG_FB_3DFX) += tdfxfb.o obj-$(CONFIG_FB_MAC) += macfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_HP300) += hpfb.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblit.o cfbcopyarea.o +obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o obj-$(CONFIG_FB_IMSTT) += imsttfb.o obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o obj-$(CONFIG_FB_CLGEN) += clgenfb.o diff -urN linux-2.5/drivers/video/offb.c pmac-2.5/drivers/video/offb.c --- linux-2.5/drivers/video/offb.c 2002-12-10 15:20:32.000000000 +1100 +++ pmac-2.5/drivers/video/offb.c 2002-12-10 19:58:24.000000000 +1100 @@ -393,6 +393,7 @@ struct fb_fix_screeninfo *fix; struct fb_var_screeninfo *var; struct fb_info *info; + int size; if (!request_mem_region(res_start, res_size, "offb")) return; @@ -421,7 +422,7 @@ var = &info->var; strcpy(fix->id, "OFfb "); - strncat(fix->id, name, sizeof(fix->id)); + strncat(fix->id, name, sizeof(fix->id) - sizeof("OFfb ")); fix->id[sizeof(fix->id) - 1] = '\0'; var->xres = var->xres_virtual = width; @@ -522,8 +523,6 @@ var->sync = 0; var->vmode = FB_VMODE_NONINTERLACED; - strcpy(fix->id, "OFfb "); - strncat(fix->id, full_name, sizeof(fix->id)); info->node = NODEV; info->fbops = &offb_ops; info->screen_base = ioremap(address, fix->smem_len); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |