Skip to content

Commit

Permalink
sysbus: Document SysBusDeviceClass::init and realize semantics
Browse files Browse the repository at this point in the history
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Syntax and wording changes]
Signed-off-by: Andreas Färber <afaerber@suse.de>
  • Loading branch information
Hu Tao authored and afaerber committed Jul 22, 2013
1 parent dc4aa51 commit ce72439
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/hw/sysbus.h
Expand Up @@ -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;
Expand Down

0 comments on commit ce72439

Please sign in to comment.