mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
hw/sd: Use the QOM BUS() macro to access BusState.qbus
Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus) Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20190528164020.32250-6-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
0ce5e0201f
commit
6afa968a93
2 changed files with 2 additions and 2 deletions
|
@ -249,7 +249,7 @@ static void ssi_sd_realize(SSISlave *d, Error **errp)
|
|||
/* Create and plug in the sd card */
|
||||
/* FIXME use a qdev drive property instead of drive_get_next() */
|
||||
dinfo = drive_get_next(IF_SD);
|
||||
carddev = qdev_create(&s->sdbus.qbus, TYPE_SD_CARD);
|
||||
carddev = qdev_create(BUS(&s->sdbus), TYPE_SD_CARD);
|
||||
if (dinfo) {
|
||||
qdev_prop_set_drive(carddev, "drive", blk_by_legacy_dinfo(dinfo), &err);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue