mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 21:33:40 +08:00
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>
This commit is contained in:
parent
751ebc13cc
commit
7f7420a09f
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user