From patchwork Mon Feb 25 03:49:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 15054 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 8EBCC23E27 for ; Mon, 25 Feb 2013 03:51:42 +0000 (UTC) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by fiordland.canonical.com (Postfix) with ESMTP id 46392A18069 for ; Mon, 25 Feb 2013 03:51:42 +0000 (UTC) Received: by mail-vb0-f53.google.com with SMTP id fj18so1451928vbb.40 for ; Sun, 24 Feb 2013 19:51:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=wDwb+UWSjN0KhH5gtPAYUYvcrHg2W1v1wrZSw2HN6So=; b=VM22FEVAnXj+KvJGzFBr4oavdRd/pA2HAnbiQ1MSOa1LU2m4dR4opRem1ibXwxDW52 eQxYn9MN+oSyNe0d8LCXMk++GJbPDWYNLDB25JTIsvb+mtLIweORNuUvlV4SA7AZR69n WuRk2PfIUHWl9UwUTxsdtL9g4zKFCENpGoEsKeB9DuASUmLEijogBNPSzVtYRQigrvoB 1rCnwjnZRyaWHhDlAhih71RGc9Q/OivTZsAbqLVP6/7lDWoF8UGaxrbVVMmCpDeHkjuQ 4ylz5Z//XWSrElrMk0pNiAOKMvDLx4FpDujjcSp++H3KXbFq6XTFQeK7Rt9AhlDG/S5K IZdg== X-Received: by 10.58.84.164 with SMTP id a4mr9671875vez.9.1361764301709; Sun, 24 Feb 2013 19:51:41 -0800 (PST) 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.58.145.101 with SMTP id st5csp39572veb; Sun, 24 Feb 2013 19:51:41 -0800 (PST) X-Received: by 10.66.145.130 with SMTP id su2mr16664344pab.74.1361764300800; Sun, 24 Feb 2013 19:51:40 -0800 (PST) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx.google.com with ESMTPS id ak6si10443325pbd.14.2013.02.24.19.51.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Feb 2013 19:51:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.220.47; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) smtp.mail=haojian.zhuang@linaro.org Received: by mail-pa0-f47.google.com with SMTP id bj3so1490238pad.6 for ; Sun, 24 Feb 2013 19:51:40 -0800 (PST) X-Received: by 10.68.216.99 with SMTP id op3mr15770436pbc.187.1361764300311; Sun, 24 Feb 2013 19:51:40 -0800 (PST) Received: from localhost.localdomain ([67.198.145.34]) by mx.google.com with ESMTPS id b9sm11188695pba.6.2013.02.24.19.51.35 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Feb 2013 19:51:39 -0800 (PST) From: Haojian Zhuang To: grinberg@compulab.co.il, linus.walleij@linaro.org, linux@arm.linux.org.uk, marek.vasut@gmail.com, robert.jarzmik@free.fr, daniel@caiaq.de, linux-arm-kernel@lists.infradead.org, grant.likely@secretlab.ca, cxie4@marvell.com Cc: patches@linaro.org, Haojian Zhuang Subject: [PATCH v5 09/12] gpio: pxa: remove arch related macro Date: Mon, 25 Feb 2013 11:49:38 +0800 Message-Id: <1361764181-26647-10-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1361764181-26647-1-git-send-email-haojian.zhuang@linaro.org> References: <1361764181-26647-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQluI47OKUU8/khtd3F0kGQCCLfDHrN/G7GNQJ4bupPB5gAp5esvDtBa8YNj54jNZG276GU8 Remove macro CONFIG_ARCH_PXA. Signed-off-by: Haojian Zhuang Tested-by: Igor Grinberg Acked-by: Linus Walleij --- drivers/gpio/gpio-pxa.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 141190c..f5f78ea 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -554,21 +554,21 @@ static int pxa_gpio_probe(struct platform_device *pdev) } if (!use_of) { -#ifdef CONFIG_ARCH_PXA - irq = gpio_to_irq(0); - irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, - handle_edge_irq); - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); - irq_set_chained_handler(IRQ_GPIO0, pxa_gpio_demux_handler); - - irq = gpio_to_irq(1); - irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, - handle_edge_irq); - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); - irq_set_chained_handler(IRQ_GPIO1, pxa_gpio_demux_handler); -#endif - - for (irq = gpio_to_irq(gpio_offset); + if (irq0 > 0) { + irq = gpio_to_irq(0); + irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, + handle_edge_irq); + set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); + irq_set_chained_handler(irq0, pxa_gpio_demux_handler); + } + if (irq1 > 0) { + irq = gpio_to_irq(1); + irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, + handle_edge_irq); + set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); + irq_set_chained_handler(irq1, pxa_gpio_demux_handler); + } + for (irq = gpio_to_irq(gpio_offset); irq <= gpio_to_irq(pxa_last_gpio); irq++) { irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, handle_edge_irq);