From patchwork Wed Sep 18 11:17:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20388 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f197.google.com (mail-ye0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1F22626114 for ; Wed, 18 Sep 2013 11:17:53 +0000 (UTC) Received: by mail-ye0-f197.google.com with SMTP id q5sf6665079yen.8 for ; Wed, 18 Sep 2013 04:17:53 -0700 (PDT) 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:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=tBo7IraE3LMY5oSBRf8SgJzXYWpTauGAvc9TBmRbmK0=; b=bqe22OLzZnpbR2CgXRh3rCkQ5lOFavYT8jIL//OOVeR3TmpkXBEpmfPOlc8tlca9oX Yx/zwbJH0UQkwLvVvcGA9V1tqGsXn3u6AO11REohn3X7BqrZLC6eyqRbw7Ici22zv/BV Q3ZzAbd+YqC7V4XYd8DMrXQAz73T4KwIUvSXaAhYPTh1V83jNN2TuX5NnGoSGeDaY9Dq GjSAHEoYmAAJJnbhv/JMRoJ4M7PbUSWJktPphQ60wAKAdH85ZU8KdwuOeqxem1pwxVbr sYmCd8zIRfzaoWe0LdPnbqZ+iYkhYzcUmCQ4MqN1uXYspKSVmQ7+ZOcLe/doXg+hgoLM XHfg== X-Gm-Message-State: ALoCoQlJhbL1dGKckxh89jWZaCOy8U/QgWpmd8HRfBMv3/AmO/1yVyWOlT46HBus2CieRbkJxfjJ X-Received: by 10.236.116.135 with SMTP id g7mr703844yhh.53.1379503073406; Wed, 18 Sep 2013 04:17:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.47.82 with SMTP id b18ls3292262qen.53.gmail; Wed, 18 Sep 2013 04:17:53 -0700 (PDT) X-Received: by 10.220.46.72 with SMTP id i8mr38040923vcf.10.1379503073324; Wed, 18 Sep 2013 04:17:53 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id tm8si346986vdc.137.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 04:17:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db12so5217930veb.8 for ; Wed, 18 Sep 2013 04:17:53 -0700 (PDT) X-Received: by 10.220.43.19 with SMTP id u19mr37204206vce.3.1379503073240; Wed, 18 Sep 2013 04:17:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp211915vcz; Wed, 18 Sep 2013 04:17:52 -0700 (PDT) X-Received: by 10.152.37.41 with SMTP id v9mr34829475laj.9.1379503072115; Wed, 18 Sep 2013 04:17:52 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by mx.google.com with ESMTPS id pw1si1369266lbb.16.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 04:17:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.52 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id ev20so5331517lab.25 for ; Wed, 18 Sep 2013 04:17:51 -0700 (PDT) X-Received: by 10.152.2.4 with SMTP id 4mr34448583laq.0.1379503071072; Wed, 18 Sep 2013 04:17:51 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id ua4sm1233496lbb.17.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Sep 2013 04:17:50 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , George Cherian , Kuninori Morimoto , Felipe Balbi Subject: [PATCH] gpio: pcf857x: only use set_irq_flags() on ARM Date: Wed, 18 Sep 2013 13:17:31 +0200 Message-Id: <1379503051-27310-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , As per the pattern from other GPIO drivers, use set_irq_flags() on ARM only, use irq_set_noprobe() on other archs. Also rename the argument "virq" to just "irq", this IRQ isn't any more "virtual" than any other Linux IRQ number, we use "hwirq" for the actual hw-numbers, "virq" is just bogus. Cc: George Cherian Cc: Kuninori Morimoto Cc: Felipe Balbi Signed-off-by: Linus Walleij --- drivers/gpio/gpio-pcf857x.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c index 815944d..54725a6 100644 --- a/drivers/gpio/gpio-pcf857x.c +++ b/drivers/gpio/gpio-pcf857x.c @@ -195,15 +195,19 @@ static irqreturn_t pcf857x_irq(int irq, void *data) return IRQ_HANDLED; } -static int pcf857x_irq_domain_map(struct irq_domain *domain, unsigned int virq, +static int pcf857x_irq_domain_map(struct irq_domain *domain, unsigned int irq, irq_hw_number_t hw) { struct pcf857x *gpio = domain->host_data; - irq_set_chip_and_handler(virq, + irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_level_irq); - set_irq_flags(virq, IRQF_VALID); +#ifdef CONFIG_ARM + set_irq_flags(irq, IRQF_VALID); +#else + irq_set_noprobe(irq); +#endif gpio->irq_mapped |= (1 << hw); return 0;