diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2016-02-11 15:09:33 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2016-02-11 15:09:33 +0000 |
| commit | fc1ec1acffd29d54c0c4266d30d38b2399d42f4f (patch) | |
| tree | 38dd37dda993a32ca05e05102bb1838769613a12 /hw/audio | |
| parent | f16368459957603b8b3efa83353cc7e13ab6abd3 (diff) | |
| parent | 1834ed3afc578b8dbf39838cfdf27d457771a334 (diff) | |
| download | focaccia-qemu-fc1ec1acffd29d54c0c4266d30d38b2399d42f4f.tar.gz focaccia-qemu-fc1ec1acffd29d54c0c4266d30d38b2399d42f4f.zip | |
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2016-02-11' into staging
trivial patches for 2016-02-11 # gpg: Signature made Thu 11 Feb 2016 12:16:04 GMT using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" * remotes/mjt/tags/pull-trivial-patches-2016-02-11: w32: include winsock2.h before windows.h Adds keycode 86 to the hid_usage_keys translation table. s390x: remove s390-zipl.rom Passthru CCID card: QOMify Emulated CCID card: QOMify ES1370: QOMify char: fix parameter name / type in BSD codepath qmp-spec: fix index in doc rdma: remove check on time_spent when calculating mbs qemu-sockets: simplify error handling cpu: cpu_save/cpu_load is no more qom: Correct object_property_get_int() description man: virtfs-proxy-helper: Rework awkward sentence remove libtool support Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/audio')
| -rw-r--r-- | hw/audio/es1370.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 96acbc6e2f..8449b5f436 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -289,6 +289,10 @@ struct chan_bits { uint32_t *old_freq, uint32_t *new_freq); }; +#define TYPE_ES1370 "ES1370" +#define ES1370(obj) \ + OBJECT_CHECK(ES1370State, (obj), TYPE_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, @@ -1014,7 +1018,7 @@ static void es1370_on_reset (void *opaque) static void es1370_realize(PCIDevice *dev, Error **errp) { - ES1370State *s = DO_UPCAST (ES1370State, dev, dev); + ES1370State *s = ES1370(dev); uint8_t *c = s->dev.config; c[PCI_STATUS + 1] = PCI_STATUS_DEVSEL_SLOW >> 8; @@ -1039,7 +1043,7 @@ static void es1370_realize(PCIDevice *dev, Error **errp) static int es1370_init (PCIBus *bus) { - pci_create_simple (bus, -1, "ES1370"); + pci_create_simple (bus, -1, TYPE_ES1370); return 0; } @@ -1060,7 +1064,7 @@ static void es1370_class_init (ObjectClass *klass, void *data) } static const TypeInfo es1370_info = { - .name = "ES1370", + .name = TYPE_ES1370, .parent = TYPE_PCI_DEVICE, .instance_size = sizeof (ES1370State), .class_init = es1370_class_init, |