Message ID | f5112168b8a81409653a01668f78570a8e919db9.1452902914.git.alistair.francis@xilinx.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D3CD91401AF for <incoming@patchwork.ozlabs.org>; Sat, 16 Jan 2016 11:22:12 +1100 (AEDT) Received: from localhost ([::1]:49500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1aKEd8-0008MB-OD for incoming@patchwork.ozlabs.org; Fri, 15 Jan 2016 19:22:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <alistair.francis@xilinx.com>) id 1aKEch-0007RO-2m for qemu-devel@nongnu.org; Fri, 15 Jan 2016 19:21:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alistair.francis@xilinx.com>) id 1aKEcd-0006v1-R0 for qemu-devel@nongnu.org; Fri, 15 Jan 2016 19:21:43 -0500 Received: from mail-sn1nam02on0065.outbound.protection.outlook.com ([104.47.36.65]:64240 helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <alistair.francis@xilinx.com>) id 1aKEcd-0006uh-Ln for qemu-devel@nongnu.org; Fri, 15 Jan 2016 19:21:39 -0500 Received: from CY1NAM02FT047.eop-nam02.prod.protection.outlook.com (10.152.74.59) by CY1NAM02HT226.eop-nam02.prod.protection.outlook.com (10.152.74.201) with Microsoft SMTP Server (TLS) id 15.1.355.15; Sat, 16 Jan 2016 00:21:37 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed) header.d=none; redhat.com; dmarc=none action=none header.from=xilinx.com; Received-SPF: Fail (protection.outlook.com: domain of xilinx.com does not designate 149.199.60.96 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.96; helo=xsj-tvapsmtpgw01; Received: from xsj-tvapsmtpgw01 (149.199.60.96) by CY1NAM02FT047.mail.protection.outlook.com (10.152.74.177) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Sat, 16 Jan 2016 00:21:36 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:58696 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from <alistair.francis@xilinx.com>) id 1aKEcZ-0006RE-Ut; Fri, 15 Jan 2016 16:21:35 -0800 Received: from [127.0.0.1] (port=37682 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from <alistair.francis@xilinx.com>) id 1aKEcZ-0002Gk-PL; Fri, 15 Jan 2016 16:21:35 -0800 Received: from xsj-tvapsmtp02 (xsj-tvapsmtp02.xilinx.com [172.16.1.203]) by tsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u0G0G3pj010704; Fri, 15 Jan 2016 16:16:03 -0800 Received: from [172.19.74.182] (port=50528 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from <alistair.francis@xilinx.com>) id 1aKEcY-0002Gh-Sw; Fri, 15 Jan 2016 16:21:34 -0800 From: Alistair Francis <alistair.francis@xilinx.com> To: <qemu-devel@nongnu.org> Date: Fri, 15 Jan 2016 16:19:11 -0800 Message-ID: <f5112168b8a81409653a01668f78570a8e919db9.1452902914.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <cover.1452902914.git.alistair.francis@xilinx.com> References: <cover.1452902914.git.alistair.francis@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22054.006 X-TM-AS-Result: No--1.030-7.0-31-10 X-imss-scan-details: No--1.030-7.0-31-10 X-TMASE-MatchedRID: f9f8R8FcFNiXvbahSGf3YEKcYi5Qw/RVMZm0+sEE9mu8NrbzjPvzJ039 pXYjpT7kFyLGKcmORXBlZa1SJU9MorEdfduECr41ngIgpj8eDcAZ1CdBJOsoY9mzcdRxL+xwKra uXd3MZDVeUBkYCpYOFX23sKobj04pBLz1OqEMmQ+2rJtIbagY5CIZ5x1/yn+hUDC3S27zV7YWnq iNtgylN1zuvS3j64b5IiuaSXzzJ1WZbXP29aXx5lPJnXL2yNYdkuo847l05tDEzMyAmsz+FCp60 PS4RsxcQwymtxuJ6y0= X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.96; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(87936001)(36756003)(92566002)(76176999)(6806005)(77096005)(5001960100002)(50986999)(2351001)(229853001)(47776003)(118296001)(586003)(1096002)(86362001)(11100500001)(2950100001)(33646002)(1220700001)(50466002)(106466001)(5003600100002)(50226001)(105606002)(64026002)(110136002)(2906002)(5008740100001)(81156007)(19580405001)(19580395003)(48376002)(4326007)(71366001)(189998001)(85426001)(5003940100001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1NAM02HT226; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; PTR:unknown-60-96.xilinx.com; MX:1; A:1; LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f4e40c80-b1d6-490b-954a-08d31e0aff2c X-Exchange-Antispam-Report-Test: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:CY1NAM02HT226; UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: <34fec73e3e414e14aadb7bbf7a4e6b34@CY1NAM02HT226.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(13015025)(13017025)(13018025)(5005006)(3002001)(10201501046); SRVR:CY1NAM02HT226; BCL:0; PCL:0; RULEID:; SRVR:CY1NAM02HT226; X-Forefront-PRVS: 0823A5777B X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2016 00:21:36.5705 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.96]; Helo=[xsj-tvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT226 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.65 Cc: peter.maydell@linaro.org, crosthwaitepeter@gmail.com, pbonzini@redhat.com, lig.fnst@cn.fujitsu.com, alistair.francis@xilinx.com Subject: [Qemu-devel] [RFC v1 1/2] qdev-monitor.c: Register reset function if the device has one X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org |
diff --git a/qdev-monitor.c b/qdev-monitor.c index 3ce4710..8e43074 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -560,6 +560,8 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error **errp) if (bus) { qdev_set_parent_bus(dev, bus); + } else if (dc->reset) { + qemu_register_reset((void (*)(void *))dc->reset, dev); } id = qemu_opts_id(opts);
If the device being added when running qdev_device_add() has a reset function, register it so that it can be called. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> --- qdev-monitor.c | 2 ++ 1 file changed, 2 insertions(+)