summaryrefslogtreecommitdiff
path: root/drivers/block/floppy.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2009-01-31 17:47:44 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-25 02:38:24 +0300
commit71b3e0c1ad90f28e34c105069175cbd4edb43dfa (patch)
treeaf7f1dd890d10acc33e36a923d2604ff26dfb071 /drivers/block/floppy.c
parent49b420a13ff95b449947181190b08367348e3e1b (diff)
downloadlinux-71b3e0c1ad90f28e34c105069175cbd4edb43dfa.tar.xz
platform: make better use of to_platform_{device,driver}() macros
This helps the code look more consistent and cleaner. Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/block/floppy.c')
-rw-r--r--drivers/block/floppy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 83d8ed39433d..c2c95e614506 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4135,10 +4135,9 @@ static int have_no_fdc = -ENODEV;
static ssize_t floppy_cmos_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct platform_device *p;
+ struct platform_device *p = to_platform_device(dev);
int drive;
- p = container_of(dev, struct platform_device,dev);
drive = p->id;
return sprintf(buf, "%X\n", UDP->cmos);
}