[PATCH 1/2] disk_drive: fix x86 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



switch to resource

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx>
---
 drivers/ata/disk_drive.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/disk_drive.c b/drivers/ata/disk_drive.c
index 523edfd..14b5e66 100644
--- a/drivers/ata/disk_drive.c
+++ b/drivers/ata/disk_drive.c
@@ -190,11 +190,11 @@ static int disk_probe(struct device_d *dev)
 
 #ifdef CONFIG_ATA_BIOS
 	/* On x86, BIOS based disks are coming without a valid .size field */
-	if (dev->size == 0) {
+	if (dev->resource[0].size == 0) {
 		/* guess the size of this drive if not otherwise given */
-		dev->size = disk_guess_size(dev,
+		dev->resource[0].size = disk_guess_size(dev,
 			(struct partition_entry*)&sector[446]) * SECTOR_SIZE;
-		dev_info(dev, "Drive size guessed to %u kiB\n", dev->size / 1024);
+		dev_info(dev, "Drive size guessed to %u kiB\n", dev->resource[0].size / 1024);
 	}
 #endif
 	atablk->blk.num_blocks = dev->resource[0].size / SECTOR_SIZE;
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux