tree 1e2fe584510f1af920b084cbbe1f2fe756508733 parent 94fd0db7bfb4a03da202fd426d4e8e7eab42ab86 author Andrew Morton <[EMAIL PROTECTED]> Thu, 28 Jul 2005 07:37:34 -0700 committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Tue, 06 Sep 2005 06:03:11 -0700
[PATCH] Floppy: add cmos attribute to floppy driver tidy Fiddle with coding style a bit. Cc: Hannes Reinecke <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> drivers/block/floppy.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -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) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html