diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-08-14 16:59:51 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-15 08:57:28 +0200 |
commit | feb4e2c0c51561a6823b2a81a6b978ce09e6f9c4 (patch) | |
tree | efb565904325c49a4b2b991fcb188c534f35a55e | |
parent | 4f9ea7ffbdb3cafff5e995716e09547ba6f345e2 (diff) | |
download | barebox-feb4e2c0c51561a6823b2a81a6b978ce09e6f9c4.tar.gz barebox-feb4e2c0c51561a6823b2a81a6b978ce09e6f9c4.tar.xz |
disk_drive: fix x86 support
switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | 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 523edfd8c1..14b5e66141 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*)§or[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; |