diff options
author | Mao Zhongyi | 2018-12-13 14:47:56 +0100 |
---|---|---|
committer | Peter Maydell | 2018-12-13 14:47:56 +0100 |
commit | 7f7420a09ffe2e89c7de0aec41b1953adcc254ca (patch) | |
tree | 1f45e1b8219f067796fe1c0901059ddde34d0558 | |
parent | Allow AArch64 processors to boot from a kernel placed over 4GB (diff) | |
download | qemu-7f7420a09ffe2e89c7de0aec41b1953adcc254ca.tar.gz qemu-7f7420a09ffe2e89c7de0aec41b1953adcc254ca.tar.xz qemu-7f7420a09ffe2e89c7de0aec41b1953adcc254ca.zip |
musicpal: Convert sysbus init function to realize function
Use DeviceClass rather than SysBusDeviceClass in
mv88w8618_wlan_class_init().
Cc: jan.kiszka@web.de
Cc: peter.maydell@linaro.org
Cc: qemu-arm@nongnu.org
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181130093852.20739-2-maozhongyi@cmss.chinamobile.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/arm/musicpal.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 726ae29394..d22532a11c 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1147,14 +1147,13 @@ static const MemoryRegionOps mv88w8618_wlan_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -static int mv88w8618_wlan_init(SysBusDevice *dev) +static void mv88w8618_wlan_realize(DeviceState *dev, Error **errp) { MemoryRegion *iomem = g_new(MemoryRegion, 1); memory_region_init_io(iomem, OBJECT(dev), &mv88w8618_wlan_ops, NULL, "musicpal-wlan", MP_WLAN_SIZE); - sysbus_init_mmio(dev, iomem); - return 0; + sysbus_init_mmio(SYS_BUS_DEVICE(dev), iomem); } /* GPIO register offsets */ @@ -1720,9 +1719,9 @@ DEFINE_MACHINE("musicpal", musicpal_machine_init) static void mv88w8618_wlan_class_init(ObjectClass *klass, void *data) { - SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass); + DeviceClass *dc = DEVICE_CLASS(klass); - sdc->init = mv88w8618_wlan_init; + dc->realize = mv88w8618_wlan_realize; } static const TypeInfo mv88w8618_wlan_info = { |