aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/spitz.c10
-rw-r--r--hw/tosa.c10
2 files changed, 6 insertions, 14 deletions
diff --git a/hw/spitz.c b/hw/spitz.c
index c05b5f7d56..0adae596b5 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -708,17 +708,13 @@ static void spitz_ssp_attach(PXA2xxState *cpu)
static void spitz_microdrive_attach(PXA2xxState *cpu, int slot)
{
PCMCIACardState *md;
- BlockDriverState *bs;
DriveInfo *dinfo;
dinfo = drive_get(IF_IDE, 0, 0);
- if (!dinfo)
+ if (!dinfo || dinfo->media_cd)
return;
- bs = dinfo->bdrv;
- if (bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) {
- md = dscm1xxxx_init(dinfo);
- pxa2xx_pcmcia_attach(cpu->pcmcia[slot], md);
- }
+ md = dscm1xxxx_init(dinfo);
+ pxa2xx_pcmcia_attach(cpu->pcmcia[slot], md);
}
/* Wm8750 and Max7310 on I2C */
diff --git a/hw/tosa.c b/hw/tosa.c
index a7967a286e..7b407f4f64 100644
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -51,17 +51,13 @@
static void tosa_microdrive_attach(PXA2xxState *cpu)
{
PCMCIACardState *md;
- BlockDriverState *bs;
DriveInfo *dinfo;
dinfo = drive_get(IF_IDE, 0, 0);
- if (!dinfo)
+ if (!dinfo || dinfo->media_cd)
return;
- bs = dinfo->bdrv;
- if (bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) {
- md = dscm1xxxx_init(dinfo);
- pxa2xx_pcmcia_attach(cpu->pcmcia[0], md);
- }
+ md = dscm1xxxx_init(dinfo);
+ pxa2xx_pcmcia_attach(cpu->pcmcia[0], md);
}
static void tosa_out_switch(void *opaque, int line, int level)