* [PATCH] q40fb: New framebuffer_alloc API and class_dev changes
@ 2003-09-15 21:06 Kronos
0 siblings, 0 replies; only message in thread
From: Kronos @ 2003-09-15 21:06 UTC (permalink / raw)
To: Richard.Zidlicky; +Cc: linux-fbdev-devel, James Simmons
Hi,
this patch converts driver/video/q40fb.c to framebuffer_alloc:
======== drivers/video/q40fb.c 1.24 ========
D 1.24 03/09/14 00:09:28+02:00 kronos@kronoz.cjb.net 26 25 14/10/117
P drivers/video/q40fb.c
C switch to framebuffer_alloc
------------------------------------------------
===== drivers/video/q40fb.c 1.23 vs 1.24 =====
--- 1.23/drivers/video/q40fb.c Thu Apr 24 12:30:41 2003
+++ 1.24/drivers/video/q40fb.c Sun Sep 14 00:09:28 2003
@@ -31,7 +31,7 @@
#define Q40_PHYS_SCREEN_ADDR 0xFE800000
static u32 pseudo_palette[17];
-static struct fb_info fb_info;
+static struct fb_info *fb_info;
static struct fb_fix_screeninfo q40fb_fix __initdata = {
.id = "Q40",
@@ -100,27 +100,31 @@
if ( !MACH_IS_Q40)
return -ENXIO;
+ fb_info = framebuffer_alloc(0, NULL);
+ if (!fb_info)
+ return -ENOMEM;
+
/* mapped in q40/config.c */
q40fb_fix.smem_start = Q40_PHYS_SCREEN_ADDR;
- fb_info.var = q40fb_var;
- fb_info.fix = q40fb_fix;
- fb_info.fbops = &q40fb_ops;
- fb_info.flags = FBINFO_FLAG_DEFAULT; /* not as module for now */
- fb_info.pseudo_palette = pseudo_palette;
- fb_info.screen_base = (char *) q40fb_fix.smem_start;
+ fb_info->var = q40fb_var;
+ fb_info->fix = q40fb_fix;
+ fb_info->fbops = &q40fb_ops;
+ fb_info->flags = FBINFO_FLAG_DEFAULT; /* not as module for now */
+ fb_info->pseudo_palette = pseudo_palette;
+ fb_info->screen_base = (char *) q40fb_fix.smem_start;
- fb_alloc_cmap(&fb_info.cmap, 16, 0);
+ fb_alloc_cmap(&fb_info->cmap, 16, 0);
master_outb(3, DISPLAY_CONTROL_REG);
- if (register_framebuffer(&fb_info) < 0) {
+ if (register_framebuffer(fb_info) < 0) {
printk(KERN_ERR "Unable to register Q40 frame buffer\n");
return -EINVAL;
}
printk(KERN_INFO "fb%d: Q40 frame buffer alive and kicking !\n",
- fb_info.node);
+ fb_info->node);
return 0;
}
Luca
--
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
"Fare l'amore con dieci donne e` fantastico, soprattutto perche` ti
presentano un sacco di amiche." -- Fabio Di Iorio
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-09-15 21:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-15 21:06 [PATCH] q40fb: New framebuffer_alloc API and class_dev changes Kronos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).