aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2015-07-02 16:23:25 +1000
committerAlexander Graf <agraf@suse.de>2015-07-07 17:44:53 +0200
commite275934d2dd44e38e0c6d53f9c22383d2ba57c17 (patch)
tree32c8ae92f2d0c8bedb73a90b30422b1c23a6ce14
parent0f888bfaddfc5f55b0d82cde2e1164658a672375 (diff)
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>
-rw-r--r--hw/char/spapr_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index 2d532afc55..36b328b9af 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -193,7 +193,7 @@ VIOsPAPRDevice *spapr_vty_get_default(VIOsPAPRBus *bus)
DeviceState *iter = kid->child;
/* 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;
}