From fa1d36df7466ebbef0331b79d0ce3c5e140695c9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 7 Oct 2014 13:59:13 +0200 Subject: block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch is big, but all it really does is replacing dinfo->bdrv by blk_bs(blk_by_legacy_dinfo(dinfo)) The replacement is repetitive, but the conversion of device models to BlockBackend is imminent, and will shorten it to just blk_legacy_dinfo(dinfo). Line wrapping muddies the waters a bit. I also omit tests whether dinfo->bdrv is null, because it never is. Signed-off-by: Markus Armbruster Reviewed-by: BenoƮt Canet Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- hw/sd/pl181.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/sd/pl181.c') diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c index 462558b76d..0501d4079c 100644 --- a/hw/sd/pl181.c +++ b/hw/sd/pl181.c @@ -7,6 +7,7 @@ * This code is licensed under the GPL. */ +#include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "hw/sysbus.h" #include "hw/sd.h" @@ -490,7 +491,7 @@ static int pl181_init(SysBusDevice *sbd) sysbus_init_irq(sbd, &s->irq[1]); qdev_init_gpio_out(dev, s->cardstatus, 2); dinfo = drive_get_next(IF_SD); - s->card = sd_init(dinfo ? dinfo->bdrv : NULL, false); + s->card = sd_init(dinfo ? blk_bs(blk_by_legacy_dinfo(dinfo)) : NULL, false); if (s->card == NULL) { return -1; } -- cgit v1.2.3