From cb42a1b1461e02efb034582ac5d8f71534723b92 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Thu, 23 Dec 2010 02:54:08 +0100 Subject: upstream: integrate block changes This large patch upgrades the block support code to the upstream version available in ba5e7f82169f32ab8163c707d97c799ca09f8924 dated 2010-08-08 Change-Id: I8b24df0c287e72f6620650a4d6a62e1bb315453e --- hw/android_arm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'hw/android_arm.c') diff --git a/hw/android_arm.c b/hw/android_arm.c index d805b0e..6062981 100644 --- a/hw/android_arm.c +++ b/hw/android_arm.c @@ -20,6 +20,7 @@ #include "audio/audio.h" #include "arm-misc.h" #include "console.h" +#include "blockdev.h" #ifdef CONFIG_MEMCHECK #include "memcheck/memcheck_api.h" #endif // CONFIG_MEMCHECK @@ -120,9 +121,10 @@ static void android_arm_init_(ram_addr_t ram_size, goldfish_audio_init(0xff004000, 0, audio_input_source); #endif { - int idx = drive_get_index( IF_IDE, 0, 0 ); - if (idx >= 0) - goldfish_mmc_init(0xff005000, 0, drives_table[idx].bdrv); + DriveInfo* info = drive_get( IF_IDE, 0, 0 ); + if (info != NULL) { + goldfish_mmc_init(0xff005000, 0, info->bdrv); + } } goldfish_memlog_init(0xff006000); -- cgit v1.1