
From: Andrew Morton <akpm@osdl.org>

They are ugly and they defeat typechecking.

Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/video/fbsysfs.c |   50 ++++++++++++++++++------------------------------
 1 files changed, 19 insertions(+), 31 deletions(-)

diff -puN drivers/video/fbsysfs.c~fbsysfs-remove-casts-from-void drivers/video/fbsysfs.c
--- devel/drivers/video/fbsysfs.c~fbsysfs-remove-casts-from-void	2005-07-30 16:15:24.000000000 -0700
+++ devel-akpm/drivers/video/fbsysfs.c	2005-07-30 16:15:24.000000000 -0700
@@ -106,8 +106,7 @@ static int mode_string(char *buf, unsign
 static ssize_t store_mode(struct class_device *class_device, const char * buf,
 			  size_t count)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	char mstr[100];
 	struct fb_var_screeninfo var;
 	struct fb_modelist *modelist;
@@ -137,8 +136,7 @@ static ssize_t store_mode(struct class_d
 
 static ssize_t show_mode(struct class_device *class_device, char *buf)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 
 	if (!fb_info->mode)
 		return 0;
@@ -149,8 +147,7 @@ static ssize_t show_mode(struct class_de
 static ssize_t store_modes(struct class_device *class_device, const char * buf,
 			   size_t count)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	LIST_HEAD(old_list);
 	int i = count / sizeof(struct fb_videomode);
 
@@ -174,8 +171,7 @@ static ssize_t store_modes(struct class_
 
 static ssize_t show_modes(struct class_device *class_device, char *buf)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	unsigned int i;
 	struct list_head *pos;
 	struct fb_modelist *modelist;
@@ -193,8 +189,7 @@ static ssize_t show_modes(struct class_d
 static ssize_t store_bpp(struct class_device *class_device, const char * buf,
 			 size_t count)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	struct fb_var_screeninfo var;
 	char ** last = NULL;
 	int err;
@@ -208,16 +203,14 @@ static ssize_t store_bpp(struct class_de
 
 static ssize_t show_bpp(struct class_device *class_device, char *buf)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->var.bits_per_pixel);
 }
 
 static ssize_t store_virtual(struct class_device *class_device,
 			     const char * buf, size_t count)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	struct fb_var_screeninfo var;
 	char *last = NULL;
 	int err;
@@ -236,8 +229,7 @@ static ssize_t store_virtual(struct clas
 
 static ssize_t show_virtual(struct class_device *class_device, char *buf)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xres_virtual,
 			fb_info->var.yres_virtual);
 }
@@ -249,7 +241,7 @@ static ssize_t show_virtual(struct class
 static ssize_t store_cmap(struct class_device *class_device, const char *buf,
 			  size_t count)
 {
-	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	int rc, i, start, length, transp = 0;
 
 	if ((count > PAGE_SIZE) || ((count % 16) != 0))
@@ -309,8 +301,7 @@ static ssize_t store_cmap(struct class_d
 
 static ssize_t show_cmap(struct class_device *class_device, char *buf)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	unsigned int i;
 
 	if (!fb_info->cmap.red || !fb_info->cmap.blue ||
@@ -334,8 +325,7 @@ static ssize_t show_cmap(struct class_de
 static ssize_t store_blank(struct class_device *class_device, const char * buf,
 			   size_t count)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	char *last = NULL;
 	int err;
 
@@ -351,41 +341,40 @@ static ssize_t store_blank(struct class_
 
 static ssize_t show_blank(struct class_device *class_device, char *buf)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+//	struct fb_info *fb_info = class_get_devdata(class_device);
 	return 0;
 }
 
 static ssize_t store_console(struct class_device *class_device,
 			     const char * buf, size_t count)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+//	struct fb_info *fb_info = class_get_devdata(class_device);
 	return 0;
 }
 
 static ssize_t show_console(struct class_device *class_device, char *buf)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+//	struct fb_info *fb_info = class_get_devdata(class_device);
 	return 0;
 }
 
 static ssize_t store_cursor(struct class_device *class_device,
 			    const char * buf, size_t count)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+//	struct fb_info *fb_info = class_get_devdata(class_device);
 	return 0;
 }
 
 static ssize_t show_cursor(struct class_device *class_device, char *buf)
 {
-//	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+//	struct fb_info *fb_info = class_get_devdata(class_device);
 	return 0;
 }
 
 static ssize_t store_pan(struct class_device *class_device, const char * buf,
 			 size_t count)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	struct fb_var_screeninfo var;
 	char *last = NULL;
 	int err;
@@ -408,15 +397,14 @@ static ssize_t store_pan(struct class_de
 
 static ssize_t show_pan(struct class_device *class_device, char *buf)
 {
-	struct fb_info *fb_info =
-		(struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 	return snprintf(buf, PAGE_SIZE, "%d,%d\n", fb_info->var.xoffset,
 			fb_info->var.xoffset);
 }
 
 static ssize_t show_name(struct class_device *class_device, char *buf)
 {
-	struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
+	struct fb_info *fb_info = class_get_devdata(class_device);
 
 	return snprintf(buf, PAGE_SIZE, "%s\n", fb_info->fix.id);
 }
_
