On 19 November 2018 at 12:08, Mao Zhongyi <maozhon...@cmss.chinamobile.com> wrote: > Use DeviceClass rather than SysBusDeviceClass in > xen_sysdev_class_init(). > > Cc: sstabell...@kernel.org > Cc: anthony.per...@citrix.com > Cc: xen-devel@lists.xenproject.org > > Signed-off-by: Mao Zhongyi <maozhon...@cmss.chinamobile.com> > Signed-off-by: Zhang Shengju <zhangshen...@cmss.chinamobile.com> > --- > hw/xen/xen_backend.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c > index 9a8e8771ec..73b0ed0169 100644 > --- a/hw/xen/xen_backend.c > +++ b/hw/xen/xen_backend.c > @@ -809,9 +809,8 @@ static const TypeInfo xensysbus_info = { > } > }; > > -static int xen_sysdev_init(SysBusDevice *dev) > +static void xen_sysdev_realize(DeviceState *dev, Error **errp) > { > - return 0; > } > > static Property xen_sysdev_properties[] = { > @@ -821,9 +820,8 @@ static Property xen_sysdev_properties[] = { > static void xen_sysdev_class_init(ObjectClass *klass, void *data) > { > DeviceClass *dc = DEVICE_CLASS(klass); > - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); > > - k->init = xen_sysdev_init; > + dc->realize = xen_sysdev_realize; > dc->props = xen_sysdev_properties; > dc->bus_type = TYPE_XENSYSBUS; > }
If the realize function doesn't do anything at all, can't we just omit it ? thanks -- PMM _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel