This looks fine. I'll merge the framebuffer_alloc() changes into my tree and
include it with the next batch of pvr2fb updates.
On Mon, Sep 15, 2003 at 11:51:50PM +0200, Kronos wrote:
quoted hunk ↗ jump to hunk
======== drivers/video/pvr2fb.c 1.17 ========
D 1.17 03/09/12 22:26:04+02:00 kronos@kronoz.cjb.net 19 18 4/8/796
P drivers/video/pvr2fb.c
C - make it compile again. something went wrong in the merge from 1.14.1.1 to 1.6
C - switch to framebuffer_alloc
------------------------------------------------
===== drivers/video/pvr2fb.c 1.16 vs 1.17 =====
--- 1.16/drivers/video/pvr2fb.c Mon Jul 14 20:09:25 2003
+++ 1.17/drivers/video/pvr2fb.c Fri Sep 12 22:26:04 2003
@@ -609,17 +610,14 @@
if (!MACH_DREAMCAST)
return -ENXIO;
- fb_info = kmalloc(sizeof(struct fb_info) + sizeof(struct pvr2fb_par) +
- sizeof(u32) * 16, GFP_KERNEL);
+ fb_info = framebuffer_alloc(sizeof(struct pvr2fb_par) + sizeof(u32) * 16, NULL);
if (!fb_info) {
printk(KERN_ERR "Failed to allocate memory for fb_info\n");
return -ENOMEM;
}
- memset(fb_info, 0, sizeof(fb_info) + sizeof(struct pvr2fb_par) + sizeof(u32) * 16);
-
- currentpar = (struct pvr2fb_par *)(fb_info + 1);
+ currentpar = fb_info->par;
/* Make a guess at the monitor based on the attached cable */
if (pvr2_init_cable() == CT_VGA) {@@ -665,7 +663,6 @@
fb_info->fbops = &pvr2fb_ops;
fb_info->fix = pvr2_fix;
- fb_info->par = currentpar;
fb_info->pseudo_palette = (void *)(fb_info->par + 1);
fb_info->flags = FBINFO_FLAG_DEFAULT;
@@ -723,7 +720,6 @@
}
#endif
unregister_framebuffer(fb_info);
- kfree(fb_info);
}
static int __init pvr2_get_param(const struct pvr2_params *p, const char *s,