Skip to contentSkip to conversation

pm2fb: removal of pm2fb_par fields

PATCH In review Krzysztof Helt 2 participants 2 messages May 3, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pm2fb: removal of pm2fb_par fields

From: Krzysztof Helt <[email protected]>

This patch removes two redudant fields in the pm2fb_par structure.

---

This is a patch against mm tree with already sent pm2fb patches applied.

This is sent as attachment to avoid wrapping long lines.

Regards,
Krzysztof

----------------------------------------------------
Zobacz, jaką walkę stoczy superbohater, by ocalić siebie i swych bliskich. A największa bitwa rozegra się w jego duszy. SPIDER-MAN 3 w kinach od 4 maja.
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fspiderman3.html&sid=1122

drivers/video/pm2fb.c +8 -10
@@ -81,8 +81,6 @@ static int lowvsync;
 struct pm2fb_par
 {
 	pm2type_t	type;		/* Board type */
-	u32		fb_size;	/* framebuffer memory size */
-	unsigned char	__iomem *v_fb;  /* virtual address of frame buffer */
 	unsigned char	__iomem *v_regs;/* virtual address of p_regs */
 	u32 	   	memclock;	/* memclock */
 	u32		video;		/* video flags before blanking */
@@ -1169,20 +1167,20 @@ static int __devinit pm2fb_probe(struct 
 	/* Now work out how big lfb is going to be. */
 	switch(default_par->mem_config & PM2F_MEM_CONFIG_RAM_MASK) {
 	case PM2F_MEM_BANKS_1:
-		default_par->fb_size=0x200000;
+		pm2fb_fix.smem_len=0x200000;
 		break;
 	case PM2F_MEM_BANKS_2:
-		default_par->fb_size=0x400000;
+		pm2fb_fix.smem_len=0x400000;
 		break;
 	case PM2F_MEM_BANKS_3:
-		default_par->fb_size=0x600000;
+		pm2fb_fix.smem_len=0x600000;
 		break;
 	case PM2F_MEM_BANKS_4:
-		default_par->fb_size=0x800000;
+		pm2fb_fix.smem_len=0x800000;
 		break;
 	}
 	pm2fb_fix.smem_start = pci_resource_start(pdev, 1);
-	pm2fb_fix.smem_len = default_par->fb_size;
+	pm2fb_fix.smem_len = pm2fb_fix.smem_len;
 
 	/* Linear frame buffer - request region and map it. */
 	if ( !request_mem_region(pm2fb_fix.smem_start, pm2fb_fix.smem_len,
@@ -1190,9 +1188,9 @@ static int __devinit pm2fb_probe(struct 
 		printk(KERN_WARNING "pm2fb: Can't reserve smem.\n");
 		goto err_exit_mmio;
 	}
-	info->screen_base = default_par->v_fb =
+	info->screen_base =
 		ioremap_nocache(pm2fb_fix.smem_start, pm2fb_fix.smem_len);
-	if ( !default_par->v_fb ) {
+	if ( !info->screen_base ) {
 		printk(KERN_WARNING "pm2fb: Can't ioremap smem area.\n");
 		release_mem_region(pm2fb_fix.smem_start, pm2fb_fix.smem_len);
 		goto err_exit_mmio;
@@ -1218,7 +1216,7 @@ static int __devinit pm2fb_probe(struct 
 		goto err_exit_both;
 
 	printk(KERN_INFO "fb%d: %s frame buffer device, memory = %dK.\n",
-	       info->node, info->fix.id, default_par->fb_size / 1024);
+	       info->node, info->fix.id, pm2fb_fix.smem_len / 1024);
 
 	/*
 	 * Our driver data

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

#1 lore raw
Quoted 5 lines · Krzysztof Helt

From: Krzysztof Helt <[email protected]>

This patch removes two redudant fields in the pm2fb_par structure.

Quoted 9 lines

---

This is a patch against mm tree with already sent pm2fb patches applied.

This is sent as attachment to avoid wrapping long lines.

If you are unable to solve the line wrap, you can send your patch inline (for making comments) and as an attachment, next time.

Tony

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/