qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zihan Yang <whois.zihan.yang@gmail.com>
To: qemu-devel@nongnu.org
Cc: Zihan Yang <whois.zihan.yang@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] hw/input/pckdb: put TYPE_I8042 into a single header file
Date: Sun,  4 Feb 2018 15:28:22 +0800	[thread overview]
Message-ID: <1517729303-32043-2-git-send-email-whois.zihan.yang@gmail.com> (raw)
In-Reply-To: <1517729303-32043-1-git-send-email-whois.zihan.yang@gmail.com>

This allows the macro to be used elsewhere, for example,
when adding link property to vmmouse object.

Signed-off-by: Zihan Yang <whois.zihan.yang@gmail.com>
---
 hw/input/pckbd.c | 2 +-
 hw/input/pckbd.h | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 hw/input/pckbd.h

diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index c479f82..d517938 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -27,6 +27,7 @@
 #include "hw/i386/pc.h"
 #include "hw/input/ps2.h"
 #include "sysemu/sysemu.h"
+#include "pckbd.h"
 
 /* debug PC keyboard */
 //#define DEBUG_KBD
@@ -480,7 +481,6 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
     qemu_register_reset(kbd_reset, s);
 }
 
-#define TYPE_I8042 "i8042"
 #define I8042(obj) OBJECT_CHECK(ISAKBDState, (obj), TYPE_I8042)
 
 typedef struct ISAKBDState {
diff --git a/hw/input/pckbd.h b/hw/input/pckbd.h
new file mode 100644
index 0000000..9cacd0a
--- /dev/null
+++ b/hw/input/pckbd.h
@@ -0,0 +1,6 @@
+#ifndef QEMU_PCKCD_H
+#define QEMU_PCKCD_H
+
+#define TYPE_I8042 "i8042"
+
+#endif
-- 
2.7.4

  reply	other threads:[~2018-02-04  7:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-04  7:28 [Qemu-devel] [PATCH 0/2] vmmouse: convert qdev pointer property to QOM link relationship Zihan Yang
2018-02-04  7:28 ` Zihan Yang [this message]
2018-02-04  7:28 ` [Qemu-devel] [PATCH 2/2] vmmouse: change qdev pointer property to qom link Zihan Yang
2018-03-07 16:55 ` [Qemu-devel] [PATCH 0/2] vmmouse: convert qdev pointer property to QOM link relationship Zihan Yang
2018-03-07 20:27   ` Philippe Mathieu-Daudé
2018-03-08  0:31     ` Zihan Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1517729303-32043-2-git-send-email-whois.zihan.yang@gmail.com \
    --to=whois.zihan.yang@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).