aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/es1370.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/audio/es1370.c')
-rw-r--r--hw/audio/es1370.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c
index 54cc19a..4f738a0 100644
--- a/hw/audio/es1370.c
+++ b/hw/audio/es1370.c
@@ -256,6 +256,9 @@ static void print_sctl (uint32_t val)
#define lwarn(...)
#endif
+#define TYPE_ES1370 "ES1370"
+OBJECT_DECLARE_SIMPLE_TYPE(ES1370State, ES1370)
+
struct chan {
uint32_t shift;
uint32_t leftover;
@@ -278,7 +281,6 @@ struct ES1370State {
uint32_t codec;
uint32_t sctl;
};
-typedef struct ES1370State ES1370State;
struct chan_bits {
uint32_t ctl_en;
@@ -292,9 +294,6 @@ struct chan_bits {
uint32_t *old_freq, uint32_t *new_freq);
};
-#define TYPE_ES1370 "ES1370"
-OBJECT_DECLARE_SIMPLE_TYPE(ES1370State, ES1370)
-
static void es1370_dac1_calc_freq (ES1370State *s, uint32_t ctl,
uint32_t *old_freq, uint32_t *new_freq);
static void es1370_dac2_and_adc_calc_freq (ES1370State *s, uint32_t ctl,
@@ -844,7 +843,8 @@ static const VMStateDescription vmstate_es1370 = {
static void es1370_on_reset(DeviceState *dev)
{
- ES1370State *s = container_of(dev, ES1370State, dev.qdev);
+ ES1370State *s = ES1370(dev);
+
es1370_reset (s);
}