Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753325AbbHUCK1 (ORCPT ); Thu, 20 Aug 2015 22:10:27 -0400 Received: from mail-by2on0109.outbound.protection.outlook.com ([207.46.100.109]:32481 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752085AbbHUCKZ (ORCPT ); Thu, 20 Aug 2015 22:10:25 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; From: Dongsheng Wang To: CC: , , , Wang Dongsheng Subject: [PATCH v3] rtc/ds3232: fix ds3232 get a WARNING trace in resume function Date: Fri, 21 Aug 2015 10:04:55 +0800 Message-ID: <1440122695-12181-1-git-send-email-dongsheng.wang@freescale.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD020;1:cPlEYyTSG7L7QAevv7VU+oFm8CImwaKRk47rPHXNFps1vCqgcZlZOofkVed9gBtUCvPI3R3hYQ3nl+UXHaQBwbbQgzU+DmDkTl0/mW3cp4MiEmbbJWaIV5M5NOOwt4U0NvoZ7U8SchucE0IbdfQfni4vAmUWpUps8cbbYxxPkYzp2mb2BAJj5W2aifeU+UYdEVHBkxdQ1V7swY6LozHgt2tc4vQXqGV9+D/WKfY5+fhj0Mw6SPtYDXp8cTVYF+3jqE6MhIzV0Gcqnpqoc9d3GqIojMoUhDtIVJ4lPk+0jO3CHzfS9HrjNaR6N/MsCkGLQgZ98LMevW5ZloiakKe5L9KEHnIgVhQYB5YUBgxdb+lX+3tyo+gWHdokxQxtpOba9FiDBvXY8USWpkkGYwjdFA== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(3050300001)(339900001)(199003)(189002)(36756003)(105606002)(5001860100001)(110136002)(85426001)(19580395003)(229853001)(46102003)(33646002)(97736004)(19580405001)(77156002)(69596002)(50466002)(107886002)(189998001)(106466001)(5001960100002)(5001830100001)(2351001)(6806004)(81156007)(4001540100001)(104016003)(48376002)(68736005)(5003940100001)(87936001)(86362001)(47776003)(50226001)(64706001)(77096005)(5007970100001)(50986999)(92566002)(62966003)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1PR0301MB1614;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;SN1PR0301MB1614;2:FBW2lwOoETNeTPS0gFxUCK0OOR5F57t8zXsyYH/6uncyECV5WY/h5SFjPm0Qw27AYB0kvce4aIFyK3UlvGBJ/72z9NLx5atbFRZ6MxWV5UyVFE4SmgjQlnIAas5dw1/tkIZiUwQVBLOYr88UX7UMk2F823NPAEDolGR09c6fMnk=;3:tMRBQ2AKxZRd0z7pxkBggXv70kRrf5xFZC09lo6kMEgxpJPwBeKapwZqTDjWjO9/9hBBY7VNvnIJcyQFXI2pWW6Xal79JJHa8g9ldJ/kAwEGgKCd3tfIzJblIafDwW7A2mwOzmSoT7129E17oTgTOi5CWiXHcU5NcS33ulP6Pxu/YoMyXD9PwtJBPsLirvTEAHmB8+BpORvV8d36fSt0xzG5hbLgzWssbzaGpyzJgjo=;25:oS2/0mAUt24TJOebaiixmDSoNovIQ/oj3C4Fi/MoFRHDi3VINNMJhWOuX+CUwWhc27hKEutrDx/cIYJMHDacWmgUNf/cEUTePeQMQXQSqIFtz//OsjQaKip6Mbl8O/frzKKoopSDqOCyLyv8ZlzYPIXau3Jb4p+B5xoujP8AWHHUqTGl+4AiDmhTUPn+FiSg6R0rQ7/CWI25+qnWatilk3oDXIc4ILHLhC3RkzYzA44de82rJIeecYzOQR1Bsk5Z X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0301MB1614; X-Microsoft-Exchange-Diagnostics: 1;SN1PR0301MB1614;20:u3c+zVWVQYDHTatRpywJrB3Wxvlsfn/FdjOyFFZDTBdLOKmwQv7KCazikFUk0DUa/HrMEODRKqVse6vcqRFSFyQJc7Od+i2s2iBuOfZKQ8AErEHf9Rf7HkyNjYDO0oBYPzgikXpWVfjBAJ8FK4w2y+cFZeunXMCKt973HoFY446/ymhKT04cDrwNNWsG6xOM5DuAOtzTWe5sXj5Jc02+uMjYjdoOJ1h+FLxgJX1BTYDjhTTyVxM026UKst6cPDBmyParTQmUnK8WYSJ+Ys4RnbfquLLchfsNmEUyaC0ZfRB0+gxFfHJySrbJDHhAKH/kQlxFmvKp8IpgsfexMx9fHuyb83Iz+AUP7BLSFw+YFxQ=;4:CKT3zmycz8QD+qWPdu0RBGo/ecPUrbKQ4odouangT+yGGh0GTBYinP3+kEZliLskVwWH03N60g7V/IQ9Yeus/eKcGZM7NPamkDBy9DDEKyPnbunrQ2M/+urt8omTv1ToRDPQz3zhteF1ur1i9KStfGeVqAQmHCkKGpq/laS9mdeYU5JNgup8qihQUPRg3hv8UiMKUDXFOJ8DCnioHGP68BNlahEdjz28DUQ5GxcEzZIoX62woVLhb8Rt15hjsqou5QhO/NgDBJ3c9Ml4egBxLA+pGvWWnySfx5CKn0qj9DYNOVbj2LXEfDX8XZUiO6kA X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:SN1PR0301MB1614;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0301MB1614; X-Forefront-PRVS: 067553F396 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN1PR0301MB1614;23:+hWNbIYd5VVlBySzzBEM6Nh98ZuBLiXfzDInwgv?= =?us-ascii?Q?a4CBzozx4uFpG3quOpSf4t+sh8KXwz1WWYGJ//SvdMv3LX0kiApJct3Z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1XVl2BHSxJkGK4+ZhFljc45nVw19oZSE7x6kBJKy4V5ANHP?= =?us-ascii?Q?wX/Hc/+bc9XSQL0Ypoug6e0dsAISV0TvRFFBQ80/4Jm+5xnGPsVn4BHddQm3?= =?us-ascii?Q?upZmmK6vPUP90yS0yIeo2QJqAU0c8CBPh3Ailfu4JixOkmpLRe8f2/D2cUnE?= =?us-ascii?Q?YQG5siti6xgOl+9kQwP2zgoRHgg/ssn/eLuiK9a4e1hCPhGFBjC8hT0gHZeh?= =?us-ascii?Q?xSgDTaO5pZJN572PvC2Xn3xS0YG8wEiF2lt1s?= X-Microsoft-Exchange-Diagnostics: 1;SN1PR0301MB1614;5:5jhdhSRBwLE1qFs80FG/iAeCdZk+KYGG9HtOecyns2Yy1p79QOx3jigPrDrFW3nblkO74+uwVwcMU4A8Qgl1Uk8wdwo0cb/9UKLQhAn60s+bQ+O+JmU/ZLGo2JtfGXzwqwC2ogfhtOGP2hkO+CyGdQ==;24:qrQdXhN/SaxmEY3IP2DXtCI1rFoJ7PHYABjdAkS1RYOa5oWvGa6/gxI8Fj4fUUIrLjpu81aNx7diRQ8M8gJ8j9/nNTLbouVul6NAldhY7TY=;20:11JQ5O0WuZhaqVeRvXORoEwfanFubQbodL6nR3KmRItqMeYY0bBj2jeEfUjmTpLY7fmpm5LwVL0Ku4AB9/Nd6Q== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2015 02:10:22.6833 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0301MB1614 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1170 Lines: 39 From: Wang Dongsheng If ds3232 work on some platform that is not implementation irq_set_wake, ds3232 will get a WARNING trace in resume. So fix ds3232->suspended state to false when irq_set_irq_wake return error. Signed-off-by: Wang Dongsheng --- *v3* - Remove kernel trace in commit message. - s/Can not/Cannot/ *v2* - Use dev_warn_once to instead of dev_info diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 7e48e53..3554970 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -463,7 +463,10 @@ static int ds3232_suspend(struct device *dev) if (device_can_wakeup(dev)) { ds3232->suspended = true; - irq_set_irq_wake(client->irq, 1); + if (irq_set_irq_wake(client->irq, 1)) { + dev_warn_once(dev, "Cannot set wakeup sources\n"); + ds3232->suspended = false; + } } return 0; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/