aboutsummaryrefslogtreecommitdiffstats
path: root/hw/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd.c')
-rw-r--r--hw/sd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/sd.c b/hw/sd.c
index 1f00910ef..45e95f9e0 100644
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -420,14 +420,10 @@ static void sd_reset(SDState *sd, BlockDriverState *bdrv)
sd->pwd_len = 0;
}
-static void sd_cardchange(void *opaque, int reason)
+static void sd_cardchange(void *opaque)
{
SDState *sd = opaque;
- if (!(reason & CHANGE_MEDIA)) {
- return;
- }
-
qemu_set_irq(sd->inserted_cb, bdrv_is_inserted(sd->bdrv));
if (bdrv_is_inserted(sd->bdrv)) {
sd_reset(sd, sd->bdrv);
@@ -436,7 +432,7 @@ static void sd_cardchange(void *opaque, int reason)
}
static const BlockDevOps sd_block_ops = {
- .change_cb = sd_cardchange,
+ .change_media_cb = sd_cardchange,
};
/* We do not model the chip select pin, so allow the board to select