From akpm@osdl.org Wed Jul 27 17:42:05 2005 Message-Id: <200507280038.j6S0cVUe027319@shell0.pdx.osdl.net> Subject: Floppy: add cmos attribute to floppy driver tidy From: Andrew Morton To: greg@kroah.com Cc: akpm@osdl.org, hare@suse.de Date: Wed, 27 Jul 2005 17:37:34 -0700 Fiddle with coding style a bit. Cc: Hannes Reinecke Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/block/floppy.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) --- gregkh-2.6.orig/drivers/block/floppy.c 2005-07-27 22:50:41.000000000 -0700 +++ gregkh-2.6/drivers/block/floppy.c 2005-07-27 22:50:42.000000000 -0700 @@ -4193,17 +4193,16 @@ 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)