From patchwork Fri Sep 6 15:43:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 273241 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id B3F5E2C016E for ; Sat, 7 Sep 2013 01:45:37 +1000 (EST) Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe005.messaging.microsoft.com [216.32.180.188]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "MSIT Machine Auth CA 2" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 952512C0142 for ; Sat, 7 Sep 2013 01:43:58 +1000 (EST) Received: from mail28-co1-R.bigfish.com (10.243.78.225) by CO1EHSOBE025.bigfish.com (10.243.66.88) with Microsoft SMTP Server id 14.1.225.22; Fri, 6 Sep 2013 15:43:54 +0000 Received: from mail28-co1 (localhost [127.0.0.1]) by mail28-co1-R.bigfish.com (Postfix) with ESMTP id 8B04F940245; Fri, 6 Sep 2013 15:43:54 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h1de097h8275bhz2dh2a8h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1fb3h1d0ch1d2eh1d3fh1dfeh1dffh1e23h1fe8h1ff5h1155h) Received: from mail28-co1 (localhost.localdomain [127.0.0.1]) by mail28-co1 (MessageSwitch) id 137848223326480_3917; Fri, 6 Sep 2013 15:43:53 +0000 (UTC) Received: from CO1EHSMHS013.bigfish.com (unknown [10.243.78.232]) by mail28-co1.bigfish.com (Postfix) with ESMTP id 03E51B40040; Fri, 6 Sep 2013 15:43:53 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS013.bigfish.com (10.243.66.23) with Microsoft SMTP Server (TLS) id 14.16.227.3; Fri, 6 Sep 2013 15:43:52 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.3.158.2; Fri, 6 Sep 2013 15:43:51 +0000 Received: from oslab-l1.am.freescale.net ([10.214.81.253]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r86Fha8G011980; Fri, 6 Sep 2013 08:43:51 -0700 From: York Sun To: Subject: [PATCH 3/7] i2c/rtc-ds3232: Fix irq for probing Date: Fri, 6 Sep 2013 08:43:15 -0700 Message-ID: <1378482199-10581-3-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1378482199-10581-1-git-send-email-yorksun@freescale.com> References: <1378482199-10581-1-git-send-email-yorksun@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: linuxppc-dev@lists.ozlabs.org, York Sun X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16rc2 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Driver shouldn't request irq when irq = 0. It is returned from parsing device tree. 0 means no interrupt. Signed-off-by: York Sun Reviewed-by: Zang Tiefei-R61911 Reviewed-by: Fleming Andrew-AFLEMING Tested-by: Fleming Andrew-AFLEMING --- drivers/rtc/rtc-ds3232.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index b83bb5a5..ae8a28e 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -418,7 +418,7 @@ static int ds3232_probe(struct i2c_client *client, return PTR_ERR(ds3232->rtc); } - if (client->irq >= 0) { + if (client->irq > 0) { ret = devm_request_irq(&client->dev, client->irq, ds3232_irq, 0, "ds3232", client); if (ret) {