Skip to contentSkip to conversation

w100fb: Fix compile warnings

PATCH In review Antonino A. Daplas 1 participant 1 message May 16, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 4/10 w100fb: Fix compile warnings

From: Richard Purdie <[email protected]>

Fix compile warnings from w100fb.c. Attribute registration failure doesn't stop the driver working so just warn about it.

---

 drivers/video/w100fb.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
drivers/video/w100fb.c +9 -5
index 5fc86ea..003c49a 100644
@@ -660,7 +660,7 @@ int __init w100fb_probe(struct platform_
 			err = -ENODEV;
 			goto out;
 	}
-	printk(" at 0x%08lx.\n", mem->start+W100_CFG_BASE);
+	printk(" at 0x%08lx.\n", (unsigned long) mem->start+W100_CFG_BASE);
 
 	/* Remap the framebuffer */
 	remapped_fbuf = ioremap_nocache(mem->start+MEM_WINDOW_BASE, MEM_WINDOW_SIZE);
@@ -753,10 +753,14 @@ int __init w100fb_probe(struct platform_
 		goto out;
 	}
 
-	device_create_file(&pdev->dev, &dev_attr_fastpllclk);
-	device_create_file(&pdev->dev, &dev_attr_reg_read);
-	device_create_file(&pdev->dev, &dev_attr_reg_write);
-	device_create_file(&pdev->dev, &dev_attr_flip);
+	err = device_create_file(&pdev->dev, &dev_attr_fastpllclk);
+	err |= device_create_file(&pdev->dev, &dev_attr_reg_read);
+	err |= device_create_file(&pdev->dev, &dev_attr_reg_write);
+	err |= device_create_file(&pdev->dev, &dev_attr_flip);
+
+	if (err != 0)
+		printk(KERN_WARNING "fb%d: failed to register attributes (%d)\n",
+				info->node, err);
 
 	printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id);
 	return 0;

-------------------------------------------------------------------------
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/