From patchwork Mon Feb 18 05:12:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 14957 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 43D2323E0D for ; Mon, 18 Feb 2013 05:13:56 +0000 (UTC) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by fiordland.canonical.com (Postfix) with ESMTP id EE470A1852D for ; Mon, 18 Feb 2013 05:13:55 +0000 (UTC) Received: by mail-vb0-f49.google.com with SMTP id s24so3326089vbi.36 for ; Sun, 17 Feb 2013 21:13:55 -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=nDBJhNF90M/R2Azg2nMtCe0GN6MHwZN/SolB9d4955c=; b=gfikY+Vy34hsqq9hPt7s+tL2xdNmsi4HGCuHh8kaO9z3XRKvSd0g1OayeaKuwZlwfk PCKX7wJ6oq8IFb8+01zjJ+y8UKYUyul8tFWRdIsn8hHlfYbvGIT40kEUOVZHZdtGDomv aTMqqLB9ChX1GkDDtMzc8o5OVm3Ko499EDy+Km0p1DtAtp1u8nDw5/fRE4+ysrjqy1l5 LmB6Yl3lpFd/BuVv166t+wiiQd9s81ijCZtn4iaSbsy6j6KZ8J7Q/reSMS234abzzWaA hhfWBZaNXNkW7ZvDrxeoAAhbhWDGWJqA9J9WRos4OzJ3BFGXrp/gAp+n5ruiLv1R4D2y Fq+Q== X-Received: by 10.52.29.18 with SMTP id f18mr7485012vdh.57.1361164435413; Sun, 17 Feb 2013 21:13:55 -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 st5csp72440veb; Sun, 17 Feb 2013 21:13:54 -0800 (PST) X-Received: by 10.68.11.135 with SMTP id q7mr26947948pbb.5.1361164434054; Sun, 17 Feb 2013 21:13:54 -0800 (PST) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by mx.google.com with ESMTPS id tm6si11620773pbc.235.2013.02.17.21.13.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Feb 2013 21:13:54 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.220.41; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.41 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-f41.google.com with SMTP id fb11so2611548pad.14 for ; Sun, 17 Feb 2013 21:13:53 -0800 (PST) X-Received: by 10.66.75.200 with SMTP id e8mr32579511paw.72.1361164433682; Sun, 17 Feb 2013 21:13:53 -0800 (PST) Received: from localhost.localdomain ([140.206.155.71]) by mx.google.com with ESMTPS id ni3sm13194880pbc.31.2013.02.17.21.13.45 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Feb 2013 21:13:53 -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 v3 07/12] gpio: pxa: remove arch related macro Date: Mon, 18 Feb 2013 13:12:33 +0800 Message-Id: <1361164358-5845-8-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1361164358-5845-1-git-send-email-haojian.zhuang@linaro.org> References: <1361164358-5845-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQlYWsMRXFU7+Nu1zp65Dm4SWTyL78xwwAgIc91MY6KjFoHndRajrdIniz8B318Rk/vtqyoa Remove macro CONFIG_ARCH_PXA. Signed-off-by: Haojian Zhuang 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 95561d6..8130e3b 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -568,21 +568,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);