From patchwork Mon Jul 22 23:46:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 260880 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F364F2C00AC for ; Tue, 23 Jul 2013 10:17:54 +1000 (EST) Received: from localhost ([::1]:36523 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Q0J-0003Qk-Dq for incoming@patchwork.ozlabs.org; Mon, 22 Jul 2013 19:58:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Pol-0002xz-4g for qemu-devel@nongnu.org; Mon, 22 Jul 2013 19:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1Pog-0003vN-VJ for qemu-devel@nongnu.org; Mon, 22 Jul 2013 19:47:02 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45805 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Pog-0003v8-NF for qemu-devel@nongnu.org; Mon, 22 Jul 2013 19:46:58 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 28AA4A50DE; Tue, 23 Jul 2013 01:46:58 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 23 Jul 2013 01:46:08 +0200 Message-Id: <1374536796-13983-28-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1374536796-13983-1-git-send-email-afaerber@suse.de> References: <1374536796-13983-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Hu Tao , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PULL 27/55] sysbus: Document SysBusDeviceClass::init and realize semantics X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Hu Tao Signed-off-by: Hu Tao [AF: Syntax and wording changes] Signed-off-by: Andreas Färber --- include/hw/sysbus.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index 7c2e316..8c17165 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;