[PATCH 18/23] ata: switch to resource
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Jul 29 23:17:06 EDT 2011
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
drivers/ata/disk_drive.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/disk_drive.c b/drivers/ata/disk_drive.c
index 2383769..523edfd 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;
--
1.7.5.4
More information about the barebox
mailing list