aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/exynos4210_rng.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/exynos4210_rng.c')
-rw-r--r--hw/misc/exynos4210_rng.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/misc/exynos4210_rng.c b/hw/misc/exynos4210_rng.c
index 38cd61c7ea..13ec6e188b 100644
--- a/hw/misc/exynos4210_rng.c
+++ b/hw/misc/exynos4210_rng.c
@@ -24,6 +24,7 @@
#include "qemu/log.h"
#include "qemu/guest-random.h"
#include "qemu/module.h"
+#include "qom/object.h"
#define DEBUG_EXYNOS_RNG 0
@@ -35,8 +36,9 @@
} while (0)
#define TYPE_EXYNOS4210_RNG "exynos4210.rng"
-#define EXYNOS4210_RNG(obj) \
- OBJECT_CHECK(Exynos4210RngState, (obj), TYPE_EXYNOS4210_RNG)
+typedef struct Exynos4210RngState Exynos4210RngState;
+DECLARE_INSTANCE_CHECKER(Exynos4210RngState, EXYNOS4210_RNG,
+ TYPE_EXYNOS4210_RNG)
/*
* Exynos4220, PRNG, only polling mode is supported.
@@ -68,7 +70,7 @@
#define EXYNOS4210_RNG_REGS_MEM_SIZE 0x200
-typedef struct Exynos4210RngState {
+struct Exynos4210RngState {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -79,7 +81,7 @@ typedef struct Exynos4210RngState {
/* Register values */
uint32_t reg_control;
uint32_t reg_status;
-} Exynos4210RngState;
+};
static bool exynos4210_rng_seed_ready(const Exynos4210RngState *s)
{