aboutsummaryrefslogtreecommitdiff
path: root/hw/input
diff options
context:
space:
mode:
Diffstat (limited to 'hw/input')
-rw-r--r--hw/input/adb-kbd.c7
-rw-r--r--hw/input/adb-mouse.c7
-rw-r--r--hw/input/lm832x.c3
-rw-r--r--hw/input/milkymist-softusb.c4
-rw-r--r--hw/input/pl050.c3
5 files changed, 10 insertions, 14 deletions
diff --git a/hw/input/adb-kbd.c b/hw/input/adb-kbd.c
index a439bf6361..fe0c363d64 100644
--- a/hw/input/adb-kbd.c
+++ b/hw/input/adb-kbd.c
@@ -34,7 +34,8 @@
typedef struct ADBKeyboardClass ADBKeyboardClass;
typedef struct KBDState KBDState;
-#define ADB_KEYBOARD(obj) OBJECT_CHECK(KBDState, (obj), TYPE_ADB_KEYBOARD)
+DECLARE_OBJ_CHECKERS(KBDState, ADBKeyboardClass,
+ ADB_KEYBOARD, TYPE_ADB_KEYBOARD)
struct KBDState {
/*< private >*/
@@ -45,10 +46,6 @@ struct KBDState {
int rptr, wptr, count;
};
-#define ADB_KEYBOARD_CLASS(class) \
- OBJECT_CLASS_CHECK(ADBKeyboardClass, (class), TYPE_ADB_KEYBOARD)
-#define ADB_KEYBOARD_GET_CLASS(obj) \
- OBJECT_GET_CLASS(ADBKeyboardClass, (obj), TYPE_ADB_KEYBOARD)
struct ADBKeyboardClass {
/*< private >*/
diff --git a/hw/input/adb-mouse.c b/hw/input/adb-mouse.c
index 8e4cf470d4..f5750909b4 100644
--- a/hw/input/adb-mouse.c
+++ b/hw/input/adb-mouse.c
@@ -33,7 +33,8 @@
typedef struct ADBMouseClass ADBMouseClass;
typedef struct MouseState MouseState;
-#define ADB_MOUSE(obj) OBJECT_CHECK(MouseState, (obj), TYPE_ADB_MOUSE)
+DECLARE_OBJ_CHECKERS(MouseState, ADBMouseClass,
+ ADB_MOUSE, TYPE_ADB_MOUSE)
struct MouseState {
/*< public >*/
@@ -44,10 +45,6 @@ struct MouseState {
int dx, dy, dz;
};
-#define ADB_MOUSE_CLASS(class) \
- OBJECT_CLASS_CHECK(ADBMouseClass, (class), TYPE_ADB_MOUSE)
-#define ADB_MOUSE_GET_CLASS(obj) \
- OBJECT_GET_CLASS(ADBMouseClass, (obj), TYPE_ADB_MOUSE)
struct ADBMouseClass {
/*< public >*/
diff --git a/hw/input/lm832x.c b/hw/input/lm832x.c
index aab94d2815..70245fd817 100644
--- a/hw/input/lm832x.c
+++ b/hw/input/lm832x.c
@@ -29,7 +29,8 @@
#define TYPE_LM8323 "lm8323"
typedef struct LM823KbdState LM823KbdState;
-#define LM8323(obj) OBJECT_CHECK(LM823KbdState, (obj), TYPE_LM8323)
+DECLARE_INSTANCE_CHECKER(LM823KbdState, LM8323,
+ TYPE_LM8323)
struct LM823KbdState {
I2CSlave parent_obj;
diff --git a/hw/input/milkymist-softusb.c b/hw/input/milkymist-softusb.c
index 8b5ffd28f2..eaaf8adde4 100644
--- a/hw/input/milkymist-softusb.c
+++ b/hw/input/milkymist-softusb.c
@@ -52,8 +52,8 @@ enum {
#define TYPE_MILKYMIST_SOFTUSB "milkymist-softusb"
typedef struct MilkymistSoftUsbState MilkymistSoftUsbState;
-#define MILKYMIST_SOFTUSB(obj) \
- OBJECT_CHECK(MilkymistSoftUsbState, (obj), TYPE_MILKYMIST_SOFTUSB)
+DECLARE_INSTANCE_CHECKER(MilkymistSoftUsbState, MILKYMIST_SOFTUSB,
+ TYPE_MILKYMIST_SOFTUSB)
struct MilkymistSoftUsbState {
SysBusDevice parent_obj;
diff --git a/hw/input/pl050.c b/hw/input/pl050.c
index 8eb6866953..7c53ae97da 100644
--- a/hw/input/pl050.c
+++ b/hw/input/pl050.c
@@ -18,7 +18,8 @@
#define TYPE_PL050 "pl050"
typedef struct PL050State PL050State;
-#define PL050(obj) OBJECT_CHECK(PL050State, (obj), TYPE_PL050)
+DECLARE_INSTANCE_CHECKER(PL050State, PL050,
+ TYPE_PL050)
struct PL050State {
SysBusDevice parent_obj;