From patchwork Fri Sep 20 21:17:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20490 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D001E23906 for ; Fri, 20 Sep 2013 21:17:12 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id r5sf905232qcx.8 for ; Fri, 20 Sep 2013 14:17:12 -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=lofxhocaO/fZP3sAfPXozrz7LOO4+441GMiF3wRGaqc=; b=USAnx1UyyBG/8INWL78ZRG2ZULzA8kntmL38hcnAIya5WQFChCyJdRA9rQW7rCIJQc c4fO1MhkV0hEDzf+Jhad447fPojVKsVLbkjkwKd8ZsmdRn079DQCkVTOIhK35CwDvhaC FjUmvBzjRC2qF1G5lD1DWRMcHvyiHT9EoG/hWcS9ES9bFcOrPo3O1NX7EopA+94PXJ0j 8X+io0IAe+LSB/4vJOmBzPoor6hFMNGRyzBPVp/3cKAWf7Pf8KpeZmRmE/azPN1mvWE3 X4jDYtLUUdY1F6V5nvMep/FSeaM5b8j6PlyV9NLuh1U5Hi7bvwGuQTHfZ3Rkg6HVm6GE h0Rw== X-Gm-Message-State: ALoCoQlrrBLwRAvmKHn2mJfxJF/eC5PSvVUEusfHrAgqJD15tUiowr5b80MLWyS4gcJTES7VPmUP X-Received: by 10.236.73.164 with SMTP id v24mr3140702yhd.24.1379711832278; Fri, 20 Sep 2013 14:17:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.38.130 with SMTP id g2ls412317qek.99.gmail; Fri, 20 Sep 2013 14:17:12 -0700 (PDT) X-Received: by 10.220.237.208 with SMTP id kp16mr8294510vcb.4.1379711832103; Fri, 20 Sep 2013 14:17:12 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id rx3si3443425vcb.80.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 14:17:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id ij15so762295vcb.30 for ; Fri, 20 Sep 2013 14:17:12 -0700 (PDT) X-Received: by 10.220.13.20 with SMTP id z20mr8294336vcz.0.1379711831939; Fri, 20 Sep 2013 14:17:11 -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 u4csp39165vcz; Fri, 20 Sep 2013 14:17:11 -0700 (PDT) X-Received: by 10.14.37.4 with SMTP id x4mr13593169eea.16.1379711830985; Fri, 20 Sep 2013 14:17:10 -0700 (PDT) Received: from mail-ea0-f173.google.com (mail-ea0-f173.google.com [209.85.215.173]) by mx.google.com with ESMTPS id i5si12817273eeg.55.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 14:17:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.173 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.215.173; Received: by mail-ea0-f173.google.com with SMTP id g10so517619eak.18 for ; Fri, 20 Sep 2013 14:17:10 -0700 (PDT) X-Received: by 10.14.223.1 with SMTP id u1mr13595573eep.10.1379711829909; Fri, 20 Sep 2013 14:17:09 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id d8sm22247692eeh.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 20 Sep 2013 14:17:09 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Markus Mayer Subject: [PATCH] gpio: bcm-kona: only use set_irq_flags() on ARM Date: Fri, 20 Sep 2013 23:17:00 +0200 Message-Id: <1379711820-10802-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.220.171 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: Markus Mayer Signed-off-by: Linus Walleij --- drivers/gpio/gpio-bcm-kona.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index f7d932a..c0997cc 100644 --- a/drivers/gpio/gpio-bcm-kona.c +++ b/drivers/gpio/gpio-bcm-kona.c @@ -468,18 +468,22 @@ MODULE_DEVICE_TABLE(of, bcm_kona_gpio_of_match); */ static struct lock_class_key gpio_lock_class; -static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int virq, +static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hwirq) { int ret; - ret = irq_set_chip_data(virq, d->host_data); + ret = irq_set_chip_data(irq, d->host_data); if (ret < 0) return ret; - irq_set_lockdep_class(virq, &gpio_lock_class); - irq_set_chip_and_handler(virq, &bcm_gpio_irq_chip, handle_simple_irq); - irq_set_nested_thread(virq, 1); - set_irq_flags(virq, IRQF_VALID); + irq_set_lockdep_class(irq, &gpio_lock_class); + irq_set_chip_and_handler(irq, &bcm_gpio_irq_chip, handle_simple_irq); + irq_set_nested_thread(irq, 1); +#ifdef CONFIG_ARM + set_irq_flags(irq, IRQF_VALID); +#else + irq_set_noprobe(irq); +#endif return 0; }