aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/vexpress.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/vexpress.c')
-rw-r--r--hw/arm/vexpress.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index aed218f01b..828228c748 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -30,6 +30,7 @@
#include "hw/boards.h"
#include "hw/loader.h"
#include "exec/address-spaces.h"
+#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "hw/block/flash.h"
#include "sysemu/device_tree.h"
@@ -491,7 +492,8 @@ static pflash_t *ve_pflash_cfi01_register(hwaddr base, const char *name,
{
DeviceState *dev = qdev_create(NULL, "cfi.pflash01");
- if (di && qdev_prop_set_drive(dev, "drive", di->bdrv)) {
+ if (di && qdev_prop_set_drive(dev, "drive",
+ blk_bs(blk_by_legacy_dinfo(di)))) {
abort();
}