diff mbox series

[10/18] chardev: Rename RINGBUF_CHARDEV to CHARDEV_RINGBUF

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

Commit Message

Eduardo Habkost Sept. 10, 2020, 7:48 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>
---
 chardev/char-ringbuf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/chardev/char-ringbuf.c b/chardev/char-ringbuf.c
index d40d21d3cf..8d2916cd78 100644
--- a/chardev/char-ringbuf.c
+++ b/chardev/char-ringbuf.c
@@ -42,19 +42,19 @@  struct RingBufChardev {
 };
 typedef struct RingBufChardev RingBufChardev;
 
-DECLARE_INSTANCE_CHECKER(RingBufChardev, RINGBUF_CHARDEV,
+DECLARE_INSTANCE_CHECKER(RingBufChardev, CHARDEV_RINGBUF,
                          TYPE_CHARDEV_RINGBUF)
 
 static size_t ringbuf_count(const Chardev *chr)
 {
-    const RingBufChardev *d = RINGBUF_CHARDEV(chr);
+    const RingBufChardev *d = CHARDEV_RINGBUF(chr);
 
     return d->prod - d->cons;
 }
 
 static int ringbuf_chr_write(Chardev *chr, const uint8_t *buf, int len)
 {
-    RingBufChardev *d = RINGBUF_CHARDEV(chr);
+    RingBufChardev *d = CHARDEV_RINGBUF(chr);
     int i;
 
     if (!buf || (len < 0)) {
@@ -73,7 +73,7 @@  static int ringbuf_chr_write(Chardev *chr, const uint8_t *buf, int len)
 
 static int ringbuf_chr_read(Chardev *chr, uint8_t *buf, int len)
 {
-    RingBufChardev *d = RINGBUF_CHARDEV(chr);
+    RingBufChardev *d = CHARDEV_RINGBUF(chr);
     int i;
 
     qemu_mutex_lock(&chr->chr_write_lock);
@@ -87,7 +87,7 @@  static int ringbuf_chr_read(Chardev *chr, uint8_t *buf, int len)
 
 static void char_ringbuf_finalize(Object *obj)
 {
-    RingBufChardev *d = RINGBUF_CHARDEV(obj);
+    RingBufChardev *d = CHARDEV_RINGBUF(obj);
 
     g_free(d->cbuf);
 }
@@ -98,7 +98,7 @@  static void qemu_chr_open_ringbuf(Chardev *chr,
                                   Error **errp)
 {
     ChardevRingbuf *opts = backend->u.ringbuf.data;
-    RingBufChardev *d = RINGBUF_CHARDEV(chr);
+    RingBufChardev *d = CHARDEV_RINGBUF(chr);
 
     d->size = opts->has_size ? opts->size : 65536;