On 5 April 2012 16:48, Igor Mitsyanko <i.mitsya...@samsung.com> wrote: > -#define SD_INIT(sd, bdrv, is_spi) (SD_GET_CLASS(sd)->init(sd, bdrv, > is_spi)) > +#define SD_INIT(sd, bdrv, is_spi) (SD_GET_CLASS(sd)->init(sd, is_spi))
> diff --git a/hw/ssi-sd.c b/hw/ssi-sd.c > index beecc0e..38057ba 100644 > --- a/hw/ssi-sd.c > +++ b/hw/ssi-sd.c > @@ -236,11 +236,16 @@ static int ssi_sd_init(SSISlave *dev) > { > ssi_sd_state *s = FROM_SSI_SLAVE(ssi_sd_state, dev); > DriveInfo *dinfo; > + Error *errp = NULL; > > s->mode = SSI_SD_CMD; > dinfo = drive_get_next(IF_SD); > s->sd = SD_CARD(object_new(TYPE_SD_CARD)); > - SD_INIT(s->sd, dinfo ? dinfo->bdrv : NULL, true); > + if (dinfo) { > + object_property_set_int(OBJECT(s->sd), dinfo->unit, "if-idx", &errp); > + } > + assert_no_error(errp); > + SD_INIT(s->sd, true); This doesn't compile: /home/petmay01/linaro/qemu-from-laptop/qemu/hw/ssi-sd.c: In function ‘ssi_sd_init’: /home/petmay01/linaro/qemu-from-laptop/qemu/hw/ssi-sd.c:248: error: macro "SD_INIT" requires 3 arguments, but only 2 given -- PMM