From patchwork Tue Aug 11 11:28:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonyoung Shim X-Patchwork-Id: 6991691 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C6BE49F344 for ; Tue, 11 Aug 2015 11:29:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01A642062F for ; Tue, 11 Aug 2015 11:29:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 322D82060B for ; Tue, 11 Aug 2015 11:29:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964835AbbHKL26 (ORCPT ); Tue, 11 Aug 2015 07:28:58 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:47237 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934257AbbHKL2X (ORCPT ); Tue, 11 Aug 2015 07:28:23 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NSX02XXP17AKJB0@mailout1.samsung.com>; Tue, 11 Aug 2015 20:28:22 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.115]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 57.EF.29324.65CD9C55; Tue, 11 Aug 2015 20:28:22 +0900 (KST) X-AuditID: cbfee68d-f79106d00000728c-80-55c9dc56e863 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 91.BB.07062.55CD9C55; Tue, 11 Aug 2015 20:28:21 +0900 (KST) Received: from localhost.localdomain ([10.252.81.123]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NSX00CU9179S570@mmp1.samsung.com>; Tue, 11 Aug 2015 20:28:21 +0900 (KST) From: Joonyoung Shim To: rtc-linux@googlegroups.com Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, cw00.choi@samsung.com, k.kozlowski@samsung.com, jy0922.shim@samsung.com Subject: [PATCH 1/4] rtc: s3c: add missing clk control Date: Tue, 11 Aug 2015 20:28:19 +0900 Message-id: <1439292502-22912-1-git-send-email-jy0922.shim@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGLMWRmVeSWpSXmKPExsWyRsSkWDfszslQg10vWSyWXLzKbtFxbTGT xfUvz1ktXty7yGLx+oWhxeVdc9gsZpzfx2Sxv7OD0YHD48mmi4weeyaeZPPo27KK0WP6vJ9M Hp83yQWwRnHZpKTmZJalFunbJXBlPN6jVNDCUbHi5xSWBsY7bF2MnBwSAiYS86ddZoSwxSQu 3FsPFOfiEBJYwSixvmkjXNGl1b+ZIBJLGSWeXNzBCOH8YJRY8XsXE0gVm4CexJ1tx8FsEQE5 iZsH34HZzAJnGCUaTiaB2MICZhJvNx1gAbFZBFQlTl9fwtzFyMHBK+AuMX2yF8QyOYmTxyaz gsyXEGhml+hYcgGqXkDi2+RDLCD1EgKyEpsOMEPUS0ocXHGDZQKj4AJGhlWMoqkFyQXFSelF hnrFibnFpXnpesn5uZsYgcF7+t+z3h2Mtw9YH2IU4GBU4uEV8DwZKsSaWFZcmXuI0RRow0Rm KdHkfGCM5JXEGxqbGVmYmpgaG5lbmimJ8ypK/QwWEkhPLEnNTk0tSC2KLyrNSS0+xMjEwSnV wDhlguZvpyPyulMWnS+v04udc/xPs42Y7fMMgfIay2PZcnEyPNNfbzj3wHGCwdG4mauv5Tzc 9CyS+fqqf3ynQ6XnrKgPEbZXt3gUusn/q+WSi2/PxZrc7tKb8stK/aqGY21ABdeMhct4WZiv Tf1xb151YnvzyXVfuY1/uXKJHQsRtp1q6q50cqYSS3FGoqEWc1FxIgDlQQB6WQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIIsWRmVeSWpSXmKPExsVy+t9jAd2wOydDDXgtlly8ym7RcW0xk8X1 L89ZLV7cu8hi8fqFocXlXXPYLGac38dksb+zg9GBw+PJpouMHnsmnmTz6NuyitFj+ryfTB6f N8kFsEY1MNpkpCampBYppOYl56dk5qXbKnkHxzvHm5oZGOoaWlqYKynkJeam2iq5+AToumXm AF2ipFCWmFMKFApILC5W0rfDNCE0xE3XAqYxQtc3JAiux8gADSSsYcx4vEepoIWjYsXPKSwN jHfYuhg5OSQETCQurf7NBGGLSVy4tx4ozsUhJLCUUeLJxR2MEM4PRokVv3eBVbEJ6Enc2XYc zBYRkJO4efAdmM0scIZRouFkEogtLGAm8XbTARYQm0VAVeL09SXMXYwcHLwC7hLTJ3tBLJOT OHlsMusERu4FjAyrGCVSC5ILipPSc43yUsv1ihNzi0vz0vWS83M3MYKj45n0DsbDu9wPMQpw MCrx8Ap4ngwVYk0sK67MPcQowcGsJMLLcRooxJuSWFmVWpQfX1Sak1p8iNEUaP9EZinR5Hxg 5OaVxBsam5gZWRqZG1oYGZsrifPqm2wKFRJITyxJzU5NLUgtgulj4uCUamBcLGr1zmCjQ91B VuO4T9Iu+1eyBO9bGFYT15DOvHNlybR7S9nvTHm8KPfpweVVeY0FSpO2Rwap1bzM77c4tkRs jpAx1+1dIRu8i/vnlj7SXbJOwae5Wa/j1LXu3VqPTwiumH1z+sotjreclzr03kmoOzIvKtTj 54rlS6aJS8xPM6h1yFlSyXhEiaU4I9FQi7moOBEAUE3xMqQCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 It's missed to call clk_unprepare() about info->rtc_src_clk in s3c_rtc_remove and to call clk_disable_unprepare about info->rtc_clk in error routine of s3c_rtc_probe. Signed-off-by: Joonyoung Shim Reviewed-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index a0f8323..d1866a4 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -410,6 +410,8 @@ static int s3c_rtc_remove(struct platform_device *pdev) s3c_rtc_setaie(info->dev, 0); + if (info->data->needs_src_clk) + clk_unprepare(info->rtc_src_clk); clk_unprepare(info->rtc_clk); info->rtc_clk = NULL; @@ -482,6 +484,7 @@ static int s3c_rtc_probe(struct platform_device *pdev) if (IS_ERR(info->rtc_src_clk)) { dev_err(&pdev->dev, "failed to find rtc source clock\n"); + clk_disable_unprepare(info->rtc_clk); return PTR_ERR(info->rtc_src_clk); } clk_prepare_enable(info->rtc_src_clk);