summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-29 15:16:30 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-30 02:05:27 +0800
commitb1be292352d5f4aa2bc4c20008ce61d8381c3f85 (patch)
treee58e61de327d13776b86527c3766901f0206beca
parent12ed40bb177d3c41362c0f96f082f67758c4acad (diff)
downloadbarebox-b1be292352d5f4aa2bc4c20008ce61d8381c3f85.tar.gz
barebox-b1be292352d5f4aa2bc4c20008ce61d8381c3f85.tar.xz
ata: switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
-rw-r--r--drivers/ata/disk_drive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/disk_drive.c b/drivers/ata/disk_drive.c
index 23837691da..523edfd8c1 100644
--- a/drivers/ata/disk_drive.c
+++ b/drivers/ata/disk_drive.c
@@ -197,7 +197,7 @@ static int disk_probe(struct device_d *dev)
dev_info(dev, "Drive size guessed to %u kiB\n", dev->size / 1024);
}
#endif
- atablk->blk.num_blocks = dev->size / SECTOR_SIZE;
+ atablk->blk.num_blocks = dev->resource[0].size / SECTOR_SIZE;
atablk->blk.ops = &ataops;
atablk->blk.blockbits = 9;
atablk->dev = dev;