From patchwork Wed Nov 12 00:25:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 40623 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 24554205DF for ; Wed, 12 Nov 2014 00:29:49 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id ge10sf7093630lab.1 for ; Tue, 11 Nov 2014 16:29:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=K+fPPmNksQ7R+Ur363Nnn1iS2jru46dzpXy4sdcxQa8=; b=cUsUOgE2gZA6BrtZlBMiSUxQJ2mG9dDSMnAT/w9DCRf3S5Ehylz1BrZMhrbdSGxVO/ Hg7eBJfbMXoLBzBoy71vyH6jhWa4M+AbztjQEWlmae/FGhNcGUyF/sG6A2YlmTeD+G/+ 9sfjyLiOQATumneP9741x9/ceB7q4FRnWNPnr6sxDRNSYa+wymdJeUCTLY670vfN2gSQ MNQBhvDC+ypmNEZIxDinAt2W2fYoIAmWeHo2CCHy/aLKKMeVh0640U1Vv2Q3mbbMY1qj PyrRhuJjkVuXwTmyDHo2PfxdTALved+5Ml4c+6y0gnUDnlfpk5Kkr3m7+unv7agKofxn VDRQ== X-Gm-Message-State: ALoCoQmqSaVput3tESxgd6kJN65DzrKtFbN6C+7tNx3IzYCRexMp5T7ZU0AorafUzU3WLt4lBLii X-Received: by 10.152.26.72 with SMTP id j8mr7249443lag.3.1415752188153; Tue, 11 Nov 2014 16:29:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.6 with SMTP id r6ls651001lae.5.gmail; Tue, 11 Nov 2014 16:29:47 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr39040283lbc.34.1415752187879; Tue, 11 Nov 2014 16:29:47 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id an9si18761125lac.122.2014.11.11.16.29.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Nov 2014 16:29:47 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id gm9so10376884lab.19 for ; Tue, 11 Nov 2014 16:29:47 -0800 (PST) X-Received: by 10.112.150.71 with SMTP id ug7mr13821527lbb.73.1415752187799; Tue, 11 Nov 2014 16:29:47 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp347264lbc; Tue, 11 Nov 2014 16:29:47 -0800 (PST) X-Received: by 10.224.156.136 with SMTP id x8mr28122888qaw.22.1415752186470; Tue, 11 Nov 2014 16:29:46 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f3si39215429qar.93.2014.11.11.16.29.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Nov 2014 16:29:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:51559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoLof-00073E-HH for patch@linaro.org; Tue, 11 Nov 2014 19:29:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoLlW-00024P-IX for qemu-devel@nongnu.org; Tue, 11 Nov 2014 19:26:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoLlP-0000A6-6l for qemu-devel@nongnu.org; Tue, 11 Nov 2014 19:26:30 -0500 Received: from mail-oi0-f51.google.com ([209.85.218.51]:52727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoLlP-00009W-2O for qemu-devel@nongnu.org; Tue, 11 Nov 2014 19:26:23 -0500 Received: by mail-oi0-f51.google.com with SMTP id g201so7823180oib.24 for ; Tue, 11 Nov 2014 16:26:22 -0800 (PST) X-Received: by 10.202.225.5 with SMTP id y5mr23593958oig.33.1415751982696; Tue, 11 Nov 2014 16:26:22 -0800 (PST) Received: from gbellows-linaro.bellowshome.net (99-179-1-128.lightspeed.austtx.sbcglobal.net. [99.179.1.128]) by mx.google.com with ESMTPSA id d3sm6239765obs.18.2014.11.11.16.26.21 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Nov 2014 16:26:22 -0800 (PST) From: Greg Bellows To: qemu-devel@nongnu.org, peter.maydell@linaro.org, christoffer.dall@linaro.org, alex.bennee@linaro.org Date: Tue, 11 Nov 2014 18:25:55 -0600 Message-Id: <1415751963-4081-8-git-send-email-greg.bellows@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1415751963-4081-1-git-send-email-greg.bellows@linaro.org> References: <1415751963-4081-1-git-send-email-greg.bellows@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.218.51 Cc: Greg Bellows Subject: [Qemu-devel] [PATCH v1 07/15] android-console: Init the battery ID state field 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: greg.bellows@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Adds initialization of the battery ID field so that it is discoverable by name (ID) when needed by power commands. Signed-off-by: Greg Bellows --- hw/misc/goldfish_battery.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/misc/goldfish_battery.c b/hw/misc/goldfish_battery.c index a0bc379..11a2561 100644 --- a/hw/misc/goldfish_battery.c +++ b/hw/misc/goldfish_battery.c @@ -141,6 +141,11 @@ static void goldfish_battery_realize(DeviceState *dev, Error **errp) SysBusDevice *sbdev = SYS_BUS_DEVICE(dev); struct goldfish_battery_state *s = GOLDFISH_BATTERY(dev); + /* Initialize the device ID so the battery can be looked up during monitor + * commands. + */ + dev->id = strdup("goldfish_battery"); + memory_region_init_io(&s->iomem, OBJECT(s), &goldfish_battery_iomem_ops, s, "goldfish_battery", 0x1000); sysbus_init_mmio(sbdev, &s->iomem);