From patchwork Sat Nov 12 10:07:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolae Rosia X-Patchwork-Id: 9424013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0476060484 for ; Sat, 12 Nov 2016 10:08:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D81D128EDE for ; Sat, 12 Nov 2016 10:07:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCE82291D0; Sat, 12 Nov 2016 10:07:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E01428EDE for ; Sat, 12 Nov 2016 10:07:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937878AbcKLKH7 (ORCPT ); Sat, 12 Nov 2016 05:07:59 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:41458 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935328AbcKLKH6 (ORCPT ); Sat, 12 Nov 2016 05:07:58 -0500 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1c5VE5-0002iG-Ip from Nicolae_Rosia@mentor.com ; Sat, 12 Nov 2016 02:07:57 -0800 Received: from rosia.mgc (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Sat, 12 Nov 2016 10:07:56 +0000 From: Nicolae Rosia To: Alessandro Zummo , Alexandre Belloni CC: , , Tony Lindgren , Nicolae Rosia Subject: [PATCH 3/3] rtc: rtc-twl: use irq_of_parse_and_map helper Date: Sat, 12 Nov 2016 12:07:26 +0200 Message-ID: <1478945246-32056-4-git-send-email-Nicolae_Rosia@mentor.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1478945246-32056-1-git-send-email-Nicolae_Rosia@mentor.com> References: <1478945246-32056-1-git-send-email-Nicolae_Rosia@mentor.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nicolae Rosia --- drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-twl.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 2189216..7ac7579 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -481,7 +481,7 @@ config RTC_DRV_TWL92330 config RTC_DRV_TWL4030 tristate "TI TWL4030/TWL5030/TWL6030/TPS659x0" depends on TWL4030_CORE - depends on OF + depends on OF && OF_IRQ help If you say yes here you get support for the RTC on the TWL4030/TWL5030/TWL6030 family chips, used mostly with OMAP3 platforms. diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 3d76322..7994baf 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -494,7 +495,7 @@ static int twl_rtc_probe(struct platform_device *pdev) struct twl_rtc *twl_rtc; struct device_node *np = pdev->dev.of_node; int ret = -EINVAL; - int irq = platform_get_irq(pdev, 0); + int irq; u8 rd_reg; if (!np) { @@ -502,6 +503,7 @@ static int twl_rtc_probe(struct platform_device *pdev) return -EINVAL; } + irq = irq_of_parse_and_map(np, 0); if (irq <= 0) return ret;