Revision 751c6a17 hw/spitz.c
b/hw/spitz.c | ||
---|---|---|
744 | 744 |
static void spitz_microdrive_attach(PXA2xxState *cpu, int slot) |
745 | 745 |
{ |
746 | 746 |
PCMCIACardState *md; |
747 |
int index; |
|
748 | 747 |
BlockDriverState *bs; |
748 |
DriveInfo *dinfo; |
|
749 | 749 |
|
750 |
index = drive_get_index(IF_IDE, 0, 0);
|
|
751 |
if (index == -1)
|
|
750 |
dinfo = drive_get(IF_IDE, 0, 0);
|
|
751 |
if (!dinfo)
|
|
752 | 752 |
return; |
753 |
bs = drives_table[index].bdrv;
|
|
753 |
bs = dinfo->bdrv;
|
|
754 | 754 |
if (bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) { |
755 | 755 |
md = dscm1xxxx_init(bs); |
756 | 756 |
pxa2xx_pcmcia_attach(cpu->pcmcia[slot], md); |
Also available in: Unified diff