From patchwork Tue Apr 19 09:00:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jia Hongtao X-Patchwork-Id: 8878221 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CC88BBF29F for ; Tue, 19 Apr 2016 09:24:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06712201FA for ; Tue, 19 Apr 2016 09:24:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF6082024D for ; Tue, 19 Apr 2016 09:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752347AbcDSJYN (ORCPT ); Tue, 19 Apr 2016 05:24:13 -0400 Received: from mail-bn1bon0068.outbound.protection.outlook.com ([157.56.111.68]:48740 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752547AbcDSJYM (ORCPT ); Tue, 19 Apr 2016 05:24:12 -0400 Received: from BY2PR03CA003.namprd03.prod.outlook.com (10.255.93.20) by BN1PR0301MB0706.namprd03.prod.outlook.com (10.160.78.13) with Microsoft SMTP Server (TLS) id 15.1.466.19; Tue, 19 Apr 2016 09:09:25 +0000 Received: from BN1BFFO11FD055.protection.gbl (10.255.93.4) by BY2PR03CA003.outlook.office365.com (10.255.93.20) with Microsoft SMTP Server (TLS) id 15.1.453.26 via Frontend Transport; Tue, 19 Apr 2016 09:09:24 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD055.mail.protection.outlook.com (10.58.145.10) with Microsoft SMTP Server (TLS) id 15.1.472.8 via Frontend Transport; Tue, 19 Apr 2016 09:09:24 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u3J99IUr026089; Tue, 19 Apr 2016 02:09:21 -0700 From: Jia Hongtao To: , CC: , , , Subject: [PATCH V3 2/2] cpufreq: qoriq: Fix cooling device registration issue during suspend Date: Tue, 19 Apr 2016 17:00:07 +0800 Message-ID: <1461056407-22542-2-git-send-email-hongtao.jia@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1461056407-22542-1-git-send-email-hongtao.jia@nxp.com> References: <1461056407-22542-1-git-send-email-hongtao.jia@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131055305649879993; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(19580395003)(189998001)(47776003)(5001770100001)(105606002)(19580405001)(92566002)(87936001)(81166005)(4326007)(50466002)(48376002)(50226001)(36756003)(2950100001)(6806005)(5008740100001)(2906002)(104016004)(1220700001)(1096002)(86362001)(33646002)(586003)(11100500001)(85426001)(106466001)(77096005)(229853001)(5003940100001)(50986999)(76176999)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0706; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD055; 1:Dfd6R96e4w97Fu9IE0XxND6MbJwc13T0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Y1izmVawvHVB80uRwNcW/dCnPfIA1L6jfZq5bzLD1Ch1rb5SPU+hzd5AaoQNT/v9RTke6Uy4rqvItGAlDuyiw2MHic4t0IQKNNZ1i2F+48OH4fcTj3XU9JJlYDjK4otgX/Lj1qt3695ufY= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0706; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0706; 25:9WMq4+liT9HDKEzVBHIl3zqSNmfSgDl+6ahyuh5Qt7NhHhcvE0HlqGDRIuR0DKnBuu5TAZz3Vj8wN3Cqkn86babdDHpIaRPOWgWgQe3grvfKLtqWiLmv5oorSguuDXvX9Vsjmvu3eDVUf/rCL/lIRJ4/LwUBgnFC7BngA8ourb1z052SPZvbc/xeo1bfLAoi2xnI2kPvYl/ccxT7OYxwgp6ntPEYrxKk+QhUkjvMLQffqa7Bg/8Bm+exW6CXTo+RQYHRibn2evetyFPAGVg82ALoQk02LwD6ddtfVa3hd/ac0iXo/koH2SxfjQbL3dIOI00AW+JWlHDweS/rJR8CjYwPIhKOEH/TkTs55CrLu7pwuFkw3zuW74aBGQ6Jd1xyNOpO76iBRIgd5R3rl8kP5p1Gmba2bZbeODCgl3tYLGuPLEOcv/+rkujz+Xso1gMlO/VdLhpaiZpwNju/yBFaJsYGOXzbw/B3/5/ecUekkmMIMBpFU2ldS/E2vGMPZ4M4sZieI3fCtpfi69mLFPnk7lGSF3jy0/Zf/7Rmc1R/Mxf9tjVPooZRfljtkaZuYnEkQf+u/NGpuesF1cgDMWHUCmfx6KHW7W91CNST1dt0DJnJoTBOcyOg3CyWh+sL6vgSqYEeubY5mhWhGkm3IU2b4XygRHeLjxqqHWPUVxbZuBKnWvHfanYMTuDL+l84eDhdwu28Wlyrj7fYPTyWwU4lyg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(8121501046)(13015025)(13018025)(13023025)(13024025)(5005006)(10201501046)(3002001)(6055026); SRVR:BN1PR0301MB0706; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0706; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0706; 4:+jvOmi4zJgwl/3AurvCSnDPeMWvQHcL7n381YCqDut773nNEeAPGpXb0SJiIjdE5ZRH44I6TNwdeH4hpm3pSeIsE4S0eK/8rHyY9uaGu/fES2RBfu5R6jz2Oovw/suJHYZVjzQhFmuKGNMSKXezMdvF8VEO+KbpkBYtDLGxFF90zh7PmrZMFFkmXi6JEh+KQ1mnnZz8EKoNSCMLp4fqqUpZd9MlgrOpFaRGxkGEa2ykWDr9OOHdvsYA7ZutfAwzY2FYEtAB8ieazRLkfJ7wF9pZYZ+/Af2YWNFGkXB6XJR1Tfk9ei3cCkENovkRTsO0/m6E3Hi/uiXTbYd1zx+SkJHgmVXi5/ymIrjAs97bJItbvkkoyUMaUKt7JCDk8T+4cleckfxL+80U724sa/rCKw2cHAtFiSKOXdhEdWfy08Xfcu8kt16YLtSwf3EHHgoOPFRYim06EAzMdZf92Xvkt5efA31LLZnECYUiCgNdX1eQ= X-Forefront-PRVS: 0917DFAC67 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0706; 23:/rSbvNmp8whRHOwQhQA5oxNjFeJaXUUW6MvvAEt?= =?us-ascii?Q?Ek+Dwxx2szlj6x7X5H41JkgdVLCap2ZHImLWVwv4QevsOOBXSKcjcHqrlq7P?= =?us-ascii?Q?45adgQBfYNr0A708U0cs4EavoubZp0e+Llq4sbDHjCcosUYREEu8FVPYiKem?= =?us-ascii?Q?1rSsqjmd9A6/AfIXTt4cFL5/FiU1h+j1WzXYSvRetasaU3UmnGLhA+sbuGJo?= =?us-ascii?Q?D8LP23zI9RcAqcc6+8ou93rcDOwIhhahzTBCuEOHRBAn52muuMHA1axYTgEa?= =?us-ascii?Q?GyMokj39XN0zhDis2m3fTsDVJG3uo0OJw2p+BPLS/h9R+QZ1HcOeri27q5+d?= =?us-ascii?Q?g79Yz68PYv+fzrnGXnqc/uYFMoIJAq9unP4hg3Knlwh21s08/uw1K2QZzAev?= =?us-ascii?Q?AmJ+B4+WLaxno5EICi/DMgbxMd622uL3e+D6+qenqfn0Swg1o/cqjdyDuz5v?= =?us-ascii?Q?PPC0FKfjdrBGiWNQAYlJifHton3+u71qdUlebA9vhGSWZ9gFwRgsjxA45Lkh?= =?us-ascii?Q?iNDnLngAXad/gdEXE3OmGm+HaT6Fy2leEIVsR5me/w+AiUUNhVq1GZLoBIOt?= =?us-ascii?Q?PObCXtvgQNcpmn2Xr9QjAtdcO45/CKWibxgUxBYOvDsPESG36BpHUynMKFgg?= =?us-ascii?Q?Tw9MWT/J2xBSslHhAiljr+COuwGE5Y1a1XH5vC47GCCfFro64FzMRe2d01J/?= =?us-ascii?Q?qchhG/MSMjAEOhyTWZqv8XNg529d5uLVgOUQpVI7lVtpHovIhYxKymFuqikE?= =?us-ascii?Q?J0WSI4PYAIJD9aAKLKAkjwtk1SPWBDakRWKVGBlndMF4f/3NcPAtLgv5j3RU?= =?us-ascii?Q?ROYXaotUBIj70FDuS+TFFRRcmfRwLEi+YporE67+Z/Y2L7K99q44skuNpV3n?= =?us-ascii?Q?M5bNPzNLD8TPlxnqFOcxJ5fmI0GGa30dyOZcnlppAlG/S+r2CcrpqTqj+zgV?= =?us-ascii?Q?xTdyQQF/uPcJBI4fLA0db16II5mGFaL19j3TMEbrBKF8lBEvn/EnFc5vG7I/?= =?us-ascii?Q?In/GQxNwM7ZNF/My95u3+nCc0kziHPYJ2qt28AvTgE83bc7x0Al05UBA/dpS?= =?us-ascii?Q?A5vgM0Hs=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0706; 5:mRdH4UI1aNEICzsGue0ZIYysFs4RIH7RS3XOriMTBvSn7nfh6FU6WmFGiQhZRpuXeswV0xWjgo63RAJgBxP6vzKBxQUeyJgbqfGIMpEhxfyjT7TqXVywmVbnb7+doRzZLTO9Mf3+ZlnHfBGleNc5zilTBhuMuRByZpnoeVyLY0CoEi+A8bkV8WHq8rFdQKDO03jDVOu/G0pQB+xR5YHYnQ==; 24:wXanA/Ixhvi3jW5UU13bx+Q1sfZjIjtWkPAyJlvoyYjO3tSUJqAKRAMCej0T6Io1ci8A3y1ElAmYct+Cnmp4kWCA1RDbhV+P3WHdquRPoeE=; 7:2fAVNbipSe7zC8tkQz+xQCsMdHLrwLdZ55foq7hNPycjm9fMITHyj+CP9x8MEiwgTtQtt32HOOoInyODcmrmGYMx8LS+Iu6VGEK/wck1XFgxxdvKbAmc4tvyCOz1/9/uqcbnnyZ8PPBCak57EIiVAgaqM+O7REgbiOPfV463nzksKg2/MdSNBOAu+PjHhk9NRwN2u2SFlRbQwlUxURcFKHbn4NPi9+0ZRbtPZlL8N3w= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2016 09:09:24.7384 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0706 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cooling device is registered by ready callback. It's also invoked while system resuming from sleep (Enabling non-boot cpus). Thus cooling device may be multiple registered. Matchable unregistration is added to exit callback to fix this issue. Signed-off-by: Jia Hongtao --- drivers/cpufreq/qoriq-cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c index 3a3fe39..0b85f90 100644 --- a/drivers/cpufreq/qoriq-cpufreq.c +++ b/drivers/cpufreq/qoriq-cpufreq.c @@ -305,6 +305,7 @@ static int qoriq_cpufreq_cpu_exit(struct cpufreq_policy *policy) { struct cpu_data *data = policy->driver_data; + cpufreq_cooling_unregister(data->cdev); kfree(data->pclk); kfree(data->table); kfree(data);