aboutsummaryrefslogtreecommitdiff
path: root/include/hw/pcmcia.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/pcmcia.h')
-rw-r--r--include/hw/pcmcia.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/hw/pcmcia.h b/include/hw/pcmcia.h
index ebad7bc504..fb40ae7e09 100644
--- a/include/hw/pcmcia.h
+++ b/include/hw/pcmcia.h
@@ -4,6 +4,7 @@
/* PCMCIA/Cardbus */
#include "hw/qdev-core.h"
+#include "qom/object.h"
typedef struct PCMCIASocket {
qemu_irq irq;
@@ -11,22 +12,20 @@ typedef struct PCMCIASocket {
} PCMCIASocket;
#define TYPE_PCMCIA_CARD "pcmcia-card"
-#define PCMCIA_CARD(obj) \
- OBJECT_CHECK(PCMCIACardState, (obj), TYPE_PCMCIA_CARD)
-#define PCMCIA_CARD_GET_CLASS(obj) \
- OBJECT_GET_CLASS(PCMCIACardClass, obj, TYPE_PCMCIA_CARD)
-#define PCMCIA_CARD_CLASS(cls) \
- OBJECT_CLASS_CHECK(PCMCIACardClass, cls, TYPE_PCMCIA_CARD)
+typedef struct PCMCIACardClass PCMCIACardClass;
+typedef struct PCMCIACardState PCMCIACardState;
+DECLARE_OBJ_CHECKERS(PCMCIACardState, PCMCIACardClass,
+ PCMCIA_CARD, TYPE_PCMCIA_CARD)
-typedef struct PCMCIACardState {
+struct PCMCIACardState {
/*< private >*/
DeviceState parent_obj;
/*< public >*/
PCMCIASocket *slot;
-} PCMCIACardState;
+};
-typedef struct PCMCIACardClass {
+struct PCMCIACardClass {
/*< private >*/
DeviceClass parent_class;
/*< public >*/
@@ -45,7 +44,7 @@ typedef struct PCMCIACardClass {
uint32_t address, uint16_t value);
uint16_t (*io_read)(PCMCIACardState *card, uint32_t address);
void (*io_write)(PCMCIACardState *card, uint32_t address, uint16_t value);
-} PCMCIACardClass;
+};
#define CISTPL_DEVICE 0x01 /* 5V Device Information Tuple */
#define CISTPL_NO_LINK 0x14 /* No Link Tuple */