diff mbox series

[15/18] chardev: Rename VC_CHARDEV to CHARDEV_VC

Message ID 20200910194903.4104696-16-ehabkost@redhat.com
State New
Headers show
Series chardev: QOM cleanups | expand

Commit Message

Eduardo Habkost Sept. 10, 2020, 7:49 p.m. UTC
Rename instance and class type checkers to match the
TYPE_CHARDEV_* constant names and the QOM type name strings
("chardev-*").

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 ui/console.c   | 10 +++++-----
 ui/gtk.c       |  8 ++++----
 ui/spice-app.c |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/ui/console.c b/ui/console.c
index f8d7643fe4..37a7c4a713 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1090,12 +1090,12 @@  struct VCChardev {
 typedef struct VCChardev VCChardev;
 
 #define TYPE_CHARDEV_VC "chardev-vc"
-DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV,
+DECLARE_INSTANCE_CHECKER(VCChardev, CHARDEV_VC,
                          TYPE_CHARDEV_VC)
 
 static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len)
 {
-    VCChardev *drv = VC_CHARDEV(chr);
+    VCChardev *drv = CHARDEV_VC(chr);
     QemuConsole *s = drv->console;
     int i;
 
@@ -2108,7 +2108,7 @@  int qemu_console_get_height(QemuConsole *con, int fallback)
 
 static void vc_chr_set_echo(Chardev *chr, bool echo)
 {
-    VCChardev *drv = VC_CHARDEV(chr);
+    VCChardev *drv = CHARDEV_VC(chr);
     QemuConsole *s = drv->console;
 
     s->echo = echo;
@@ -2148,7 +2148,7 @@  static const GraphicHwOps text_console_ops = {
 
 static void text_console_do_init(Chardev *chr, DisplayState *ds)
 {
-    VCChardev *drv = VC_CHARDEV(chr);
+    VCChardev *drv = CHARDEV_VC(chr);
     QemuConsole *s = drv->console;
     int g_width = 80 * FONT_WIDTH;
     int g_height = 24 * FONT_HEIGHT;
@@ -2205,7 +2205,7 @@  static void vc_chr_open(Chardev *chr,
                         Error **errp)
 {
     ChardevVC *vc = backend->u.vc.data;
-    VCChardev *drv = VC_CHARDEV(chr);
+    VCChardev *drv = CHARDEV_VC(chr);
     QemuConsole *s;
     unsigned width = 0;
     unsigned height = 0;
diff --git a/ui/gtk.c b/ui/gtk.c
index 1c59de2af4..30c607a412 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -179,7 +179,7 @@  struct VCChardev {
 typedef struct VCChardev VCChardev;
 
 #define TYPE_CHARDEV_VC "chardev-vc"
-DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV,
+DECLARE_INSTANCE_CHECKER(VCChardev, CHARDEV_VC,
                          TYPE_CHARDEV_VC)
 
 bool gtk_use_gl_area;
@@ -1693,7 +1693,7 @@  static void gd_vc_adjustment_changed(GtkAdjustment *adjustment, void *opaque)
 
 static int gd_vc_chr_write(Chardev *chr, const uint8_t *buf, int len)
 {
-    VCChardev *vcd = VC_CHARDEV(chr);
+    VCChardev *vcd = CHARDEV_VC(chr);
     VirtualConsole *vc = vcd->console;
 
     vte_terminal_feed(VTE_TERMINAL(vc->vte.terminal), (const char *)buf, len);
@@ -1702,7 +1702,7 @@  static int gd_vc_chr_write(Chardev *chr, const uint8_t *buf, int len)
 
 static void gd_vc_chr_set_echo(Chardev *chr, bool echo)
 {
-    VCChardev *vcd = VC_CHARDEV(chr);
+    VCChardev *vcd = CHARDEV_VC(chr);
     VirtualConsole *vc = vcd->console;
 
     if (vc) {
@@ -1784,7 +1784,7 @@  static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc,
     GtkWidget *box;
     GtkWidget *scrollbar;
     GtkAdjustment *vadjustment;
-    VCChardev *vcd = VC_CHARDEV(chr);
+    VCChardev *vcd = CHARDEV_VC(chr);
 
     vc->s = s;
     vc->vte.echo = vcd->echo;
diff --git a/ui/spice-app.c b/ui/spice-app.c
index 93e105c6ee..e66c422e02 100644
--- a/ui/spice-app.c
+++ b/ui/spice-app.c
@@ -47,7 +47,7 @@  struct VCChardev {
 typedef struct VCChardev VCChardev;
 
 #define TYPE_CHARDEV_VC "chardev-vc"
-DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV,
+DECLARE_INSTANCE_CHECKER(VCChardev, CHARDEV_VC,
                          TYPE_CHARDEV_VC)
 
 static ChardevBackend *