hw/gpio: pca9552: default description to the instantiated type name
When no description is supplied, fall back to the actual QOM type name (pca9552 / pca9535 / pca9555) via object_get_typename() instead of the opaque "pca-unspecified" placeholder, matching the PCA9554 model and giving meaningful device labels in traces. Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr> Reviewed-by: Glenn Miles <milesg@linux.ibm.com> Link: https://lore.kernel.org/qemu-devel/20260709-catalina-upgrade-v1-4-814575bc076b@free.fr Signed-off-by: Cédric Le Goater <clg@redhat.com>
Emmanuel Blot committed
Jul 9, 2026 at 17:23 UTC
520ea63bd72d0b64fc150c92f48d5ce322712954
1 file changed
+1
-1
hw/gpio/pca9552.c
+1
-1
@@ -488,7 +488,7 @@ static void pca955x_realize(DeviceState *dev, Error **errp)
488
PCA955xState *s = PCA955X(dev);
489
490
if (!s->description) {
491
- s->description = g_strdup("pca-unspecified");
491
+ s->description = g_strdup(object_get_typename(OBJECT(dev)));
492
}
493
494
qdev_init_gpio_out(dev, s->gpio_out, k->pin_count);