From patchwork Tue Feb 11 10:18:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 319206 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pd0-x23a.google.com (mail-pd0-x23a.google.com [IPv6:2607:f8b0:400e:c02::23a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BD95F2C009B for ; Tue, 11 Feb 2014 21:19:08 +1100 (EST) Received: by mail-pd0-f186.google.com with SMTP id v10sf2099308pde.23 for ; Tue, 11 Feb 2014 02:19:02 -0800 (PST) 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 :content-transfer-encoding; bh=Oz9jyc+T38iMfsjDG2A704212v4YjGjfGHvS9DkaIGk=; b=o2AJEGmc3rKohYLHFkl/pMRphvYgBc6vP6B+T6UAq3C6q9MMIwemSRMNiMa3j7SzTp FUrdF8IiEuae9aLyl5AGw1/Hta8voMtFtx94O1Gzs9Nk8aOCm4qTrtpoJBgEHJR+560f 0gCmqyZDwq2SY3DNFHsngxwbyqMYcy5BcuPN7fHQuNdpW04bB+WAx54W/k9kqsxildDa ikSmwGQ3ngyuuZAlVmo7uaoGt0YYk1lmA5vHX5WX8eGpowd4vJ9GHpSNdlhmnyCPhNq5 y0KUgFhNeWJvoDI83xSBEAXm8DdLvLWeqWJhU3uWpkbQvOOf2Uh4i2g7jId1QKIjQxF5 EUkg== X-Received: by 10.50.134.169 with SMTP id pl9mr328786igb.17.1392113942221; Tue, 11 Feb 2014 02:19:02 -0800 (PST) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.73.163 with SMTP id m3ls2604250igv.11.gmail; Tue, 11 Feb 2014 02:19:01 -0800 (PST) X-Received: by 10.42.35.75 with SMTP id p11mr6868526icd.16.1392113941695; Tue, 11 Feb 2014 02:19:01 -0800 (PST) Received: from mail1.bemta5.messagelabs.com (mail1.bemta5.messagelabs.com. [195.245.231.150]) by gmr-mx.google.com with ESMTPS id g1si234074pbw.2.2014.02.11.02.19.01 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Feb 2014 02:19:01 -0800 (PST) Received-SPF: neutral (google.com: 195.245.231.150 is neither permitted nor denied by best guess record for domain of Adam.Thomson.Opensource@diasemi.com) client-ip=195.245.231.150; Received: from [85.158.139.35:22003] by server-14.bemta-5.messagelabs.com id 92/FC-27598-319F9F25; Tue, 11 Feb 2014 10:18:59 +0000 X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-4.tower-179.messagelabs.com!1392113938!26528942!1 X-Originating-IP: [82.210.246.133] X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 902 invoked from network); 11 Feb 2014 10:18:58 -0000 Received: from mailrelay1.diasemi.com (HELO NB-EX-CASHUB01.diasemi.com) (82.210.246.133) by server-4.tower-179.messagelabs.com with AES128-SHA encrypted SMTP; 11 Feb 2014 10:18:58 -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 Feb 2014 11:18:57 +0100 X-Authentication-Warning: swsrvapps-01.diasemi.com: athomson set sender to Adam.Thomson.Opensource@diasemi.com using -f Message-ID: <15303685eabc28d534243d0138f1457b5184644b.1392044599.git.Adam.Thomson.Opensource@diasemi.com> In-Reply-To: References: From: Adam Thomson Date: Tue, 11 Feb 2014 10:18:56 +0000 Subject: [rtc-linux] [PATCH 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@diasemi.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 195.245.231.150 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 Legal Disclaimer: This e-mail communication (and any attachment/s) is confidential and contains proprietary information, some or all of which may be legally privileged. It is intended solely for the use of the individual or entity to which it is addressed. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please consider the environment before printing this e-mail 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,