diff options
author | Andrew Morton <akpm@osdl.org> | 2005-07-27 20:37:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-05 19:03:11 -0400 |
commit | 9a8af6b3b64ee97a1aeecde017ffd02e6796913a (patch) | |
tree | 1e2fe584510f1af920b084cbbe1f2fe756508733 | |
parent | 94fd0db7bfb4a03da202fd426d4e8e7eab42ab86 (diff) |
[PATCH] Floppy: add cmos attribute to floppy driver tidy
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>
-rw-r--r-- | drivers/block/floppy.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 21f58c4b3c79..888dad5eef34 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -4193,17 +4193,16 @@ static int __init floppy_setup(char *str) | |||
4193 | 4193 | ||
4194 | static int have_no_fdc = -ENODEV; | 4194 | static int have_no_fdc = -ENODEV; |
4195 | 4195 | ||
4196 | static ssize_t floppy_cmos_show(struct device *dev, struct device_attribute *attr, char *buf) | 4196 | static ssize_t floppy_cmos_show(struct device *dev, |
4197 | struct device_attribute *attr, char *buf) | ||
4197 | { | 4198 | { |
4198 | struct platform_device *p = container_of(dev,struct platform_device,dev); | 4199 | struct platform_device *p; |
4199 | int drive = p->id; | 4200 | int drive; |
4200 | ssize_t retval; | ||
4201 | |||
4202 | retval = sprintf(buf,"%X\n", UDP->cmos); | ||
4203 | 4201 | ||
4204 | return retval; | 4202 | p = container_of(dev, struct platform_device,dev); |
4203 | drive = p->id; | ||
4204 | return sprintf(buf, "%X\n", UDP->cmos); | ||
4205 | } | 4205 | } |
4206 | |||
4207 | DEVICE_ATTR(cmos,S_IRUGO,floppy_cmos_show,NULL); | 4206 | DEVICE_ATTR(cmos,S_IRUGO,floppy_cmos_show,NULL); |
4208 | 4207 | ||
4209 | static void floppy_device_release(struct device *dev) | 4208 | static void floppy_device_release(struct device *dev) |