aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2009-01-31 09:47:44 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-24 19:38:24 -0400
commit71b3e0c1ad90f28e34c105069175cbd4edb43dfa (patch)
treeaf7f1dd890d10acc33e36a923d2604ff26dfb071 /drivers/block
parent49b420a13ff95b449947181190b08367348e3e1b (diff)
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')
-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;
4135static ssize_t floppy_cmos_show(struct device *dev, 4135static ssize_t floppy_cmos_show(struct device *dev,
4136 struct device_attribute *attr, char *buf) 4136 struct device_attribute *attr, char *buf)
4137{ 4137{
4138 struct platform_device *p; 4138 struct platform_device *p = to_platform_device(dev);
4139 int drive; 4139 int drive;
4140 4140
4141 p = container_of(dev, struct platform_device,dev);
4142 drive = p->id; 4141 drive = p->id;
4143 return sprintf(buf, "%X\n", UDP->cmos); 4142 return sprintf(buf, "%X\n", UDP->cmos);
4144} 4143}