mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fix offb
@ 2002-12-12  3:45 Paul Mackerras
  2002-12-13  5:06 ` James Simmons
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Mackerras @ 2002-12-12  3:45 UTC (permalink / raw)
  To: James Simmons; +Cc: Linux Kernel Mailing List, Linux Fbdev development list

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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix offb
  2002-12-12  3:45 [PATCH] fix offb Paul Mackerras
@ 2002-12-13  5:06 ` James Simmons
  0 siblings, 0 replies; 2+ messages in thread
From: James Simmons @ 2002-12-13  5:06 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Linux Kernel Mailing List, Linux Fbdev development list


All the patches have been applied :-)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-13  4:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-12  3:45 [PATCH] fix offb Paul Mackerras
2002-12-13  5:06 ` James Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®