From patchwork Wed Aug 31 20:49:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 3817 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4B13523F26 for ; Wed, 31 Aug 2011 20:49:52 +0000 (UTC) Received: from mail-ew0-f52.google.com (mail-ew0-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id 410D8A189E1 for ; Wed, 31 Aug 2011 20:49:52 +0000 (UTC) Received: by mail-ew0-f52.google.com with SMTP id 28so1088938ewy.11 for ; Wed, 31 Aug 2011 13:49:52 -0700 (PDT) Received: by 10.223.5.139 with SMTP id 11mr83331fav.138.1314823792107; Wed, 31 Aug 2011 13:49:52 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs30697lab; Wed, 31 Aug 2011 13:49:51 -0700 (PDT) Received: by 10.227.203.6 with SMTP id fg6mr785684wbb.24.1314823791607; Wed, 31 Aug 2011 13:49:51 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id ev1si16780852wbb.53.2011.08.31.13.49.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 31 Aug 2011 13:49:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QyrjB-00005N-5P; Wed, 31 Aug 2011 21:49:41 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Juha=20Riihim=C3=A4ki?= , Riku Voipio , Gerd Hoffmann , patches@linaro.org Subject: [PATCH 1/3] usb: Remove leading underscores from __musb_irq_max Date: Wed, 31 Aug 2011 21:49:39 +0100 Message-Id: <1314823781-304-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1314823781-304-1-git-send-email-peter.maydell@linaro.org> References: <1314823781-304-1-git-send-email-peter.maydell@linaro.org> Identifiers with double leading underscore are reserved, so rename __musb_irq_max so we don't encroach on reserved namespace. Signed-off-by: Peter Maydell --- hw/tusb6010.c | 6 +++--- hw/usb.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/tusb6010.c b/hw/tusb6010.c index de6ffc6..78814f1 100644 --- a/hw/tusb6010.c +++ b/hw/tusb6010.c @@ -785,9 +785,9 @@ static int tusb6010_init(SysBusDevice *dev) sysbus_init_mmio_region(dev, &s->iomem[0]); sysbus_init_mmio_region(dev, &s->iomem[1]); sysbus_init_irq(dev, &s->irq); - qdev_init_gpio_in(&dev->qdev, tusb6010_irq, __musb_irq_max + 1); - musb_irqs = g_new0(qemu_irq, __musb_irq_max); - for (i = 0; i < __musb_irq_max; i++) { + qdev_init_gpio_in(&dev->qdev, tusb6010_irq, musb_irq_max + 1); + musb_irqs = g_new0(qemu_irq, musb_irq_max); + for (i = 0; i < musb_irq_max; i++) { musb_irqs[i] = qdev_get_gpio_in(&dev->qdev, i + 1); } s->musb = musb_init(musb_irqs); diff --git a/hw/usb.h b/hw/usb.h index d784448..e7ce395 100644 --- a/hw/usb.h +++ b/hw/usb.h @@ -337,7 +337,8 @@ enum musb_irq_source_e { musb_irq_tx, musb_set_vbus, musb_set_session, - __musb_irq_max, + /* Add new interrupts here */ + musb_irq_max, /* total number of interrupts defined */ }; typedef struct MUSBState MUSBState;