mirror of https://github.com/xqemu/xqemu.git
spapr-vty: Use TYPE_ definition instead of hardcoding
There's a call to object_dynamic_cast() in spapr_vty which uses the type name "spapr-vty" directly, instead of the usual idiom of using the #defined TYPE_VIO_SPAPR_VTY_DEVICE. Fix it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
0f888bfadd
commit
e275934d2d
|
@ -193,7 +193,7 @@ VIOsPAPRDevice *spapr_vty_get_default(VIOsPAPRBus *bus)
|
||||||
DeviceState *iter = kid->child;
|
DeviceState *iter = kid->child;
|
||||||
|
|
||||||
/* Only look at VTY devices */
|
/* Only look at VTY devices */
|
||||||
if (!object_dynamic_cast(OBJECT(iter), "spapr-vty")) {
|
if (!object_dynamic_cast(OBJECT(iter), TYPE_VIO_SPAPR_VTY_DEVICE)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue