aboutsummaryrefslogtreecommitdiff
path: root/hw/nvram
diff options
context:
space:
mode:
Diffstat (limited to 'hw/nvram')
-rw-r--r--hw/nvram/ds1225y.c3
-rw-r--r--hw/nvram/eeprom_at24c.c3
-rw-r--r--hw/nvram/spapr_nvram.c4
3 files changed, 6 insertions, 4 deletions
diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c
index 99e27e9174..44fb7a94d3 100644
--- a/hw/nvram/ds1225y.c
+++ b/hw/nvram/ds1225y.c
@@ -111,7 +111,8 @@ static const VMStateDescription vmstate_nvram = {
#define TYPE_DS1225Y "ds1225y"
typedef struct SysBusNvRamState SysBusNvRamState;
-#define DS1225Y(obj) OBJECT_CHECK(SysBusNvRamState, (obj), TYPE_DS1225Y)
+DECLARE_INSTANCE_CHECKER(SysBusNvRamState, DS1225Y,
+ TYPE_DS1225Y)
struct SysBusNvRamState {
SysBusDevice parent_obj;
diff --git a/hw/nvram/eeprom_at24c.c b/hw/nvram/eeprom_at24c.c
index 4bf7519bc7..3e93dbbffb 100644
--- a/hw/nvram/eeprom_at24c.c
+++ b/hw/nvram/eeprom_at24c.c
@@ -29,7 +29,8 @@
#define TYPE_AT24C_EE "at24c-eeprom"
typedef struct EEPROMState EEPROMState;
-#define AT24C_EE(obj) OBJECT_CHECK(EEPROMState, (obj), TYPE_AT24C_EE)
+DECLARE_INSTANCE_CHECKER(EEPROMState, AT24C_EE,
+ TYPE_AT24C_EE)
struct EEPROMState {
I2CSlave parent_obj;
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
index b9218e0b89..57ccc174f2 100644
--- a/hw/nvram/spapr_nvram.c
+++ b/hw/nvram/spapr_nvram.c
@@ -51,8 +51,8 @@ struct SpaprNvram {
typedef struct SpaprNvram SpaprNvram;
#define TYPE_VIO_SPAPR_NVRAM "spapr-nvram"
-#define VIO_SPAPR_NVRAM(obj) \
- OBJECT_CHECK(SpaprNvram, (obj), TYPE_VIO_SPAPR_NVRAM)
+DECLARE_INSTANCE_CHECKER(SpaprNvram, VIO_SPAPR_NVRAM,
+ TYPE_VIO_SPAPR_NVRAM)
#define MIN_NVRAM_SIZE (8 * KiB)
#define DEFAULT_NVRAM_SIZE (64 * KiB)