public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Atari Atyfb fixes
@ 2003-05-11 10:30 Geert Uytterhoeven
  2003-05-11 15:16 ` Ben Collins
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2003-05-11 10:30 UTC (permalink / raw)
  To: Linus Torvalds, Ben Collins; +Cc: Linux Kernel Development, Geert Uytterhoeven

Atyfb fixes for Atari (got reversed in 2.5.69):
  - Add missing allocation of default_par
  - Kill warnings in assignments

--- linux-2.5.x/drivers/video/aty/atyfb_base.c	Mon Feb 10 21:59:19 2003
+++ linux-m68k-2.5.x/drivers/video/aty/atyfb_base.c	Tue Feb 25 18:31:27 2003
@@ -2319,15 +2319,25 @@
 			return -ENOMEM;
 		}
 		memset(info, 0, sizeof(struct fb_info));
-		info->fix = atyfb_fix;		
+
+		default_par = kmalloc(sizeof(struct atyfb_par), GFP_ATOMIC);
+		if (!default_par) {
+			printk
+			    ("atyfb_init: can't alloc atyfb_par\n");
+			kfree(info);
+			return -ENXIO;
+		}
+		memset(default_par, 0, sizeof(struct atyfb_par));
+
+		info->fix = atyfb_fix;
 
 		/*
 		 *  Map the video memory (physical address given) to somewhere in the
 		 *  kernel address space.
 		 */
-		info->screen_base = (unsigned long)ioremap(phys_vmembase[m64_num],
+		info->screen_base = ioremap(phys_vmembase[m64_num],
 					 		   phys_size[m64_num]);	
-		info->fix.smem_start = info->screen_base;	/* Fake! */
+		info->fix.smem_start = (unsigned long)info->screen_base;	/* Fake! */
 		default_par->ati_regbase = (unsigned long)ioremap(phys_guiregbase[m64_num],
 							  0x10000) + 0xFC00ul;
 		info->fix.mmio_start = default_par->ati_regbase; /* Fake! */

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: [PATCH] Atari Atyfb fixes
  2003-05-11 10:30 [PATCH] Atari Atyfb fixes Geert Uytterhoeven
@ 2003-05-11 15:16 ` Ben Collins
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Collins @ 2003-05-11 15:16 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linus Torvalds, Linux Kernel Development

On Sun, May 11, 2003 at 12:30:11PM +0200, Geert Uytterhoeven wrote:
> Atyfb fixes for Atari (got reversed in 2.5.69):
>   - Add missing allocation of default_par
>   - Kill warnings in assignments

Thanks for the Cc. The patch looked pretty safe, but I tested it on
sparc64 anyway, and it didn't break anything.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/

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

end of thread, other threads:[~2003-05-11 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-11 10:30 [PATCH] Atari Atyfb fixes Geert Uytterhoeven
2003-05-11 15:16 ` Ben Collins

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