]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Floppy: add cmos attribute to floppy driver tidy
authorAndrew Morton <akpm@osdl.org>
Thu, 28 Jul 2005 00:37:34 +0000 (17:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Sep 2005 23:03:11 +0000 (16:03 -0700)
Fiddle with coding style a bit.

Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/floppy.c

index 21f58c4b3c79c237c1c1e9d23fbca5a8cc9d6b74..888dad5eef34994fad9718223f31a1fc8513866f 100644 (file)
@@ -4193,17 +4193,16 @@ static int __init floppy_setup(char *str)
 
 static int have_no_fdc = -ENODEV;
 
-static ssize_t floppy_cmos_show(struct device *dev, struct device_attribute *attr, char *buf)
+static ssize_t floppy_cmos_show(struct device *dev,
+                               struct device_attribute *attr, char *buf)
 {
-       struct platform_device *p = container_of(dev,struct platform_device,dev);
-       int drive = p->id;
-       ssize_t retval;
-
-       retval = sprintf(buf,"%X\n", UDP->cmos);
+       struct platform_device *p;
+       int drive;
 
-       return retval;
+       p = container_of(dev, struct platform_device,dev);
+       drive = p->id;
+       return sprintf(buf, "%X\n", UDP->cmos);
 }
-
 DEVICE_ATTR(cmos,S_IRUGO,floppy_cmos_show,NULL);
 
 static void floppy_device_release(struct device *dev)