From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNqPk-00080c-5s for qemu-devel@nongnu.org; Wed, 12 Mar 2014 17:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNqPe-0008RB-6K for qemu-devel@nongnu.org; Wed, 12 Mar 2014 17:10:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45502 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNqPe-0008Oy-0e for qemu-devel@nongnu.org; Wed, 12 Mar 2014 17:10:06 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 12 Mar 2014 22:09:34 +0100 Message-Id: <1394658603-13650-3-git-send-email-afaerber@suse.de> In-Reply-To: <1394658603-13650-1-git-send-email-afaerber@suse.de> References: <1394658603-13650-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL for-2.0-rc0 02/31] qdev: Set DeviceClass::hotpluggable default in class_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= From: Igor Mammedov Move setting DeviceClass::hotpluggable default from device's class_base_init() to device's class_init(). Reported-by: Andreas F=C3=A4rber Signed-off-by: Igor Mammedov Signed-off-by: Andreas F=C3=A4rber --- hw/core/qdev.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 5377893..71b7045 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -793,14 +793,6 @@ static void device_class_base_init(ObjectClass *clas= s, void *data) * so do not propagate them to the subclasses. */ klass->props =3D NULL; - - /* by default all devices were considered as hotpluggable, - * so with intent to check it in generic qdev_unplug() / - * device_set_realized() functions make every device - * hotpluggable. Devices that shouldn't be hotpluggable, - * should override it in their class_init() - */ - klass->hotpluggable =3D true; } =20 static void device_unparent(Object *obj) @@ -846,6 +838,14 @@ static void device_class_init(ObjectClass *class, vo= id *data) class->unparent =3D device_unparent; dc->realize =3D device_realize; dc->unrealize =3D device_unrealize; + + /* by default all devices were considered as hotpluggable, + * so with intent to check it in generic qdev_unplug() / + * device_set_realized() functions make every device + * hotpluggable. Devices that shouldn't be hotpluggable, + * should override it in their class_init() + */ + dc->hotpluggable =3D true; } =20 void device_reset(DeviceState *dev) --=20 1.8.4.5