From patchwork Tue Feb 19 16:22:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 14996 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 6745E23E24 for ; Tue, 19 Feb 2013 16:23:27 +0000 (UTC) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by fiordland.canonical.com (Postfix) with ESMTP id 12369A18F0D for ; Tue, 19 Feb 2013 16:23:26 +0000 (UTC) Received: by mail-ve0-f176.google.com with SMTP id cz10so5960454veb.35 for ; Tue, 19 Feb 2013 08:23:26 -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=Y4EYfq7cPxLWvOZH6jIi7IWE1VKWgff7VZovhAMJN+0=; b=jzRNdE7DSaXwj6uqUhwUKyZftPFf6dsqqqXkoWjroiAks16xuN2/805IsaqGMjlrL3 6U4qNoYkRkwwWgFhAPWGu+yG3sJD5JrqH5EmWhxzPbU9emvqIoLr3sHKxdDwY2cYlX3c Ylr9vHxm9w+ppUoN6fSllZ5eKbKK9HAYT7/1DSewM9IAIirCj9QrlS5VkvEeR9nHhB9f yAqRjsRR0oKaaFd3E0pCH0Z1Bw1l/xbeO9LGQX+Ykr1UwyyG/9pyjfS0c6Hdfw31fxV8 JSbDQOY5JALS4+ZnU+6H7eofBqx8jfYkjysv+8geMeM8D8fX38H87U46CA2yS0dU1APQ 8/iA== X-Received: by 10.52.88.237 with SMTP id bj13mr18655868vdb.75.1361291006614; Tue, 19 Feb 2013 08:23:26 -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 st5csp150708veb; Tue, 19 Feb 2013 08:23:25 -0800 (PST) X-Received: by 10.68.202.3 with SMTP id ke3mr17858568pbc.98.1361291005363; Tue, 19 Feb 2013 08:23:25 -0800 (PST) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id b10si24266469paw.182.2013.02.19.08.23.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 08:23:25 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.160.46; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.46 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-pb0-f46.google.com with SMTP id uo15so2319297pbc.5 for ; Tue, 19 Feb 2013 08:23:25 -0800 (PST) X-Received: by 10.68.216.226 with SMTP id ot2mr41511273pbc.99.1361291004918; Tue, 19 Feb 2013 08:23:24 -0800 (PST) Received: from localhost.localdomain ([27.115.121.39]) by mx.google.com with ESMTPS id rn14sm18472714pbb.33.2013.02.19.08.23.19 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 08:23:24 -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 v4 08/11] gpio: pxa: remove arch related macro Date: Wed, 20 Feb 2013 00:22:25 +0800 Message-Id: <1361290948-16669-9-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1361290948-16669-1-git-send-email-haojian.zhuang@linaro.org> References: <1361290948-16669-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQlYzDEB3yFvi1MoDYmdCHXWHb88FBrDMd1RHI2gnqAoaNyE36osD4XV/4ysvT/wX290ySRd Remove macro CONFIG_ARCH_PXA. Signed-off-by: Haojian Zhuang Tested-by: Igor Grinberg --- 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 5879f76..983758f 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -557,21 +557,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);