diff options
author | Eric Miao <eric.miao@marvell.com> | 2009-01-31 22:47:44 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 16:38:24 -0700 |
commit | 71b3e0c1ad90f28e34c105069175cbd4edb43dfa (patch) | |
tree | af7f1dd890d10acc33e36a923d2604ff26dfb071 /drivers/block/floppy.c | |
parent | 49b420a13ff95b449947181190b08367348e3e1b (diff) | |
download | blackbird-op-linux-71b3e0c1ad90f28e34c105069175cbd4edb43dfa.tar.gz blackbird-op-linux-71b3e0c1ad90f28e34c105069175cbd4edb43dfa.zip |
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.c | 3 |
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); } |