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);
+ md = dscm1xxxx_init(dinfo);
pxa2xx_pcmcia_attach(cpu->pcmcia[0], md);
}
}
return 0;
}
-static void tosa_ssp_init(SSISlave *dev)
+static int tosa_ssp_init(SSISlave *dev)
{
/* Nothing to do. */
+ return 0;
}
typedef struct {
return -1;
}
-static void tosa_dac_init(i2c_slave *i2c)
+static int tosa_dac_init(i2c_slave *i2c)
{
/* Nothing to do. */
+ return 0;
}
static void tosa_tg_init(PXA2xxState *cpu)