From feb4e2c0c51561a6823b2a81a6b978ce09e6f9c4 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 14 Aug 2011 16:59:51 +0200 Subject: disk_drive: fix x86 support switch to resource Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- drivers/ata/disk_drive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') 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; -- cgit v1.2.3