aboutsummaryrefslogtreecommitdiff
path: root/hw/tosa.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-07-22 16:42:57 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-27 14:08:23 -0500
commit751c6a17042b5d011013d6963c0505d671cf708e (patch)
tree61a769ed1a1c16ebdfc1397ce9d775222dfa8e57 /hw/tosa.c
parent8a14daa5a1ae22fcfc317f4727a88d6c15c39aae (diff)
kill drives_table
First step cleaning up the drives handling. This one does nothing but removing drives_table[], still it became seriously big. drive_get_index() is gone and is replaced by drives_get() which hands out DriveInfo pointers instead of a table index. This needs adaption in *tons* of places all over. The drives are now maintained as linked list. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/tosa.c')
-rw-r--r--hw/tosa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/tosa.c b/hw/tosa.c
index b2d66f39d3..b932efc46c 100644
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -49,13 +49,13 @@
static void tosa_microdrive_attach(PXA2xxState *cpu)
{
PCMCIACardState *md;
- int index;
BlockDriverState *bs;
+ DriveInfo *dinfo;
- index = drive_get_index(IF_IDE, 0, 0);
- if (index == -1)
+ dinfo = drive_get(IF_IDE, 0, 0);
+ if (!dinfo)
return;
- bs = drives_table[index].bdrv;
+ bs = dinfo->bdrv;
if (bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) {
md = dscm1xxxx_init(bs);
pxa2xx_pcmcia_attach(cpu->pcmcia[0], md);