]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Atari Atyfb fixes
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 14 Apr 2003 06:45:04 +0000 (23:45 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Mon, 14 Apr 2003 06:45:04 +0000 (23:45 -0700)
Atyfb fixes for Atari:
  - Add missing allocation of default_par
  - Kill warnings in assignments

drivers/video/aty/atyfb_base.c

index 0eb14a9923ab50cf3d3c3090e0e8a2e6465a863a..42c068a984cefbabcd96f5a50fdae2b227660114 100644 (file)
@@ -2278,15 +2278,25 @@ int __init atyfb_init(void)
                        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! */