diff options
author | Hu Tao <hutao@cn.fujitsu.com> | 2013-07-01 18:18:17 +0800 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-07-23 00:37:34 +0200 |
commit | ce7243986fe69be831ec893127282fa5a045c985 (patch) | |
tree | e239338d058215a3a9cdffba16dd7789efd8b27b /include | |
parent | dc4aa51ba8bbef7edf4a104a5a6029a76a68600e (diff) |
sysbus: Document SysBusDeviceClass::init and realize semantics
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Syntax and wording changes]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/sysbus.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index 7c2e3163fb..8c17165cf2 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -23,8 +23,20 @@ typedef struct SysBusDevice SysBusDevice; #define SYS_BUS_DEVICE_GET_CLASS(obj) \ OBJECT_GET_CLASS(SysBusDeviceClass, (obj), TYPE_SYS_BUS_DEVICE) +/** + * SysBusDeviceClass: + * @init: Callback function invoked when the #DeviceState.realized property + * is changed to %true. Deprecated, new types inheriting directly from + * TYPE_SYS_BUS_DEVICE should use #DeviceClass.realize instead, new leaf + * types should consult their respective parent type. + * + * SysBusDeviceClass is not overriding #DeviceClass.realize, so derived + * classes overriding it are not required to invoke its implementation. + */ typedef struct SysBusDeviceClass { + /*< private >*/ DeviceClass parent_class; + /*< public >*/ int (*init)(SysBusDevice *dev); } SysBusDeviceClass; |