From patchwork Tue Mar 11 11:56:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 329051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wg0-x237.google.com (mail-wg0-x237.google.com [IPv6:2a00:1450:400c:c00::237]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BE0C72C00AB for ; Tue, 11 Mar 2014 22:57:05 +1100 (EST) Received: by mail-wg0-f55.google.com with SMTP id n12sf554036wgh.20 for ; Tue, 11 Mar 2014 04:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=message-id:in-reply-to:references:from:date:subject:to:cc :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=yBrxP5+vQvt4T28O+N9Myscls+wyOV5pjeZ35xH9sjs=; b=TDC/nvDeBmqf0+MCb9ucnqZjkH8aW8tkvOXWWmYgEhRBbtBh/Auuvqcc8Dqks60l0/ IycQELeuddDQZFRz+xDiDfYBydPBMkvb4UoOTiRfKr6wTKHTy2bQvXq7x+WqZfVtbCss gROgFSmQ2M0iY7G/td4qEerIu/tA6ftqexLs0dBuG1OIcCwkJdFvP3RJlP6KHzz36cp0 CY60J8UG7z3Oa51SfnvIdKd2hqSVXykP46fQ65ORp0dbXUK/wbSZ4VYRbcZgdhggSkqz hjraGi9PXnZ6gkkCd1PZmU1nfZTlLkcSIhr07KVWpTMV/JgBBAHeNx+sytGvnz5i5BGA z/tg== X-Received: by 10.152.164.231 with SMTP id yt7mr680lab.40.1394539021202; Tue, 11 Mar 2014 04:57:01 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.152.246.10 with SMTP id xs10ls955166lac.18.gmail; Tue, 11 Mar 2014 04:57:00 -0700 (PDT) X-Received: by 10.112.145.164 with SMTP id sv4mr15130899lbb.15.1394539020891; Tue, 11 Mar 2014 04:57:00 -0700 (PDT) Received: from mail1.bemta5.messagelabs.com (mail1.bemta5.messagelabs.com. [195.245.231.148]) by gmr-mx.google.com with ESMTPS id i9si126072wiw.0.2014.03.11.04.57.00 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Mar 2014 04:57:00 -0700 (PDT) Received-SPF: neutral (google.com: 195.245.231.148 is neither permitted nor denied by best guess record for domain of Adam.Thomson.Opensource@diasemi.com) client-ip=195.245.231.148; Received: from [85.158.139.19:37308] by server-12.bemta-5.messagelabs.com id 61/C0-03824-C0AFE135; Tue, 11 Mar 2014 11:57:00 +0000 X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-13.tower-178.messagelabs.com!1394539009!31081465!2 X-Originating-IP: [82.210.246.133] X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20116 invoked from network); 11 Mar 2014 11:56:50 -0000 Received: from mailrelay1.diasemi.com (HELO NB-EX-CASHUB01.diasemi.com) (82.210.246.133) by server-13.tower-178.messagelabs.com with AES128-SHA encrypted SMTP; 11 Mar 2014 11:56:50 -0000 Received: from mailrelay1.diasemi.com (10.1.17.243) by NB-EX-CASHUB01.diasemi.com (10.1.16.140) with Microsoft SMTP Server id 14.2.309.2; Tue, 11 Mar 2014 12:56:50 +0100 Received: from swsrvapps-01.diasemi.com (Not Verified[10.20.28.141]) by mailrelay1.diasemi.com with ESMTP Gateway id ; Tue, 11 Mar 2014 12:56:50 +0100 Received: (from athomson@localhost) by swsrvapps-01.diasemi.com (8.14.3/8.14.3/Submit/Dlg) id s2BBunCY000953; Tue, 11 Mar 2014 11:56:49 GMT X-Authentication-Warning: swsrvapps-01.diasemi.com: athomson set sender to Adam.Thomson.Opensource@diasemi.com using -f Message-ID: In-Reply-To: References: From: Adam Thomson Date: Tue, 11 Mar 2014 11:56:49 +0000 Subject: [rtc-linux] [PATCH Resend 2/2] rtc: da9055: Remove use of regmap_irq_get_virq() To: Dmitry Torokhov , Dmitry Torokhov , Alessandro Zummo CC: , MIME-Version: 1.0 X-Original-Sender: adam.thomson.opensource@diasemi.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 195.245.231.148 is neither permitted nor denied by best guess record for domain of Adam.Thomson.Opensource@diasemi.com) smtp.mail=Adam.Thomson.Opensource@diasemi.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Using platform_get_irq_byname() to retrieve the IRQ number returns the VIRQ number rather than the local IRQ number for the device. Passing that value then into regmap_irq_get_virq() causes a failure because the function is expecting the local IRQ number (e.g. 0, 1, 2, 3, etc). This patch removes use of regmap_irq_get_virq() to prevent this failure from happening Signed-off-by: Adam Thomson --- drivers/rtc/rtc-da9055.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -- 1.7.0.4 diff --git a/drivers/rtc/rtc-da9055.c b/drivers/rtc/rtc-da9055.c index 48cb2ac..a825491 100644 --- a/drivers/rtc/rtc-da9055.c +++ b/drivers/rtc/rtc-da9055.c @@ -302,7 +302,9 @@ static int da9055_rtc_probe(struct platform_device *pdev) } alm_irq = platform_get_irq_byname(pdev, "ALM"); - alm_irq = regmap_irq_get_virq(rtc->da9055->irq_data, alm_irq); + if (alm_irq < 0) + return alm_irq; + ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL, da9055_rtc_alm_irq, IRQF_TRIGGER_HIGH | IRQF_ONESHOT,