aboutsummaryrefslogtreecommitdiff
path: root/hw/ssi-sd.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-01-28 11:21:37 +0100
committerKevin Wolf <kwolf@redhat.com>2011-01-31 10:24:11 +0100
commit13839974d14701626a2f9dcc5f8cf65783d51c11 (patch)
tree536cfb5745cf7b76304d7a01fec3d48befb59ec1 /hw/ssi-sd.c
parent1869a65385e9d81f490b4203dd070cc49b7749c9 (diff)
blockdev: New drive_get_next(), replacing qdev_init_bdrv()
qdev_init_bdrv() doesn't belong into qdev.c; it's about drives, not qdevs. Rename to drive_get_next, move to blockdev.c, drop the bogus DeviceState argument, and return DriveInfo instead of BlockDriverState. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ssi-sd.c')
-rw-r--r--hw/ssi-sd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/ssi-sd.c b/hw/ssi-sd.c
index a1a63b23e2..fb4b649279 100644
--- a/hw/ssi-sd.c
+++ b/hw/ssi-sd.c
@@ -7,6 +7,7 @@
* This code is licenced under the GNU GPL v2.
*/
+#include "blockdev.h"
#include "ssi.h"
#include "sd.h"
@@ -231,11 +232,11 @@ static int ssi_sd_load(QEMUFile *f, void *opaque, int version_id)
static int ssi_sd_init(SSISlave *dev)
{
ssi_sd_state *s = FROM_SSI_SLAVE(ssi_sd_state, dev);
- BlockDriverState *bs;
+ DriveInfo *dinfo;
s->mode = SSI_SD_CMD;
- bs = qdev_init_bdrv(&dev->qdev, IF_SD);
- s->sd = sd_init(bs, 1);
+ dinfo = drive_get_next(IF_SD);
+ s->sd = sd_init(dinfo ? dinfo->bdrv : NULL, 1);
register_savevm(&dev->qdev, "ssi_sd", -1, 1, ssi_sd_save, ssi_sd_load, s);
return 0;
}