From patchwork Sun Sep 18 02:41:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 9337501 X-Patchwork-Delegate: rjw@sisk.pl 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 79C996077F for ; Sun, 18 Sep 2016 02:41:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6ACC328F49 for ; Sun, 18 Sep 2016 02:41:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F3B228F57; Sun, 18 Sep 2016 02:41:25 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 2B19E28F49 for ; Sun, 18 Sep 2016 02:41:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755464AbcIRClX (ORCPT ); Sat, 17 Sep 2016 22:41:23 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:33950 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755391AbcIRClW (ORCPT ); Sat, 17 Sep 2016 22:41:22 -0400 Received: by mail-pa0-f65.google.com with SMTP id vz6so5206099pab.1 for ; Sat, 17 Sep 2016 19:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ingics-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=VCI5YVMOTa+nYMFz65X/qkC+1PNvLTtQaBUR/MLyG4g=; b=NQwOnfwffrIlsPoJ2X5xAFKzFSHIE3rUBTmo1DKGdn0RwV9IWu9E67DX0EMnd2s8bm BypNL5OG8PzKeabbGhkT+OKl3hhbUnQiC3iqdAZYRrLgHvgpcyQe3damx6arcJbEkMzl 6pEF1r+snyDVbzq55DgWDqE2XFBA+jPVsj0ppM4IV4elgAzvRpIGQ7/Yl2hUdO3AS7e7 nmRNoqBsDmR7ecpaooBj3AzTRTzbxkLFdaVVZxF2gai3tTYWVHb6FH0B6cqmJqL5H79d o2SCdSauwgNftFhlQJ2LVqJN5EWnKPjO4mkvcm//cMLDhZJclZ5FMbGO79VxfPy7aBl4 7MXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VCI5YVMOTa+nYMFz65X/qkC+1PNvLTtQaBUR/MLyG4g=; b=FiN1gmjuC+rQdzafhNy8EQpGDiYlk+/LoqoMFEyHLN3KLEVZHPju6GCso1WXcZpI0k XWWaa3dr//uuwsrD56WBl65HM0x0Snfb7S6e+ZUcAcDgaKkdLU+HoYQsx1Cei2Hi+1LK zPmBiH1iP/AFrrmm+JACsZBJhMwcrQ+xWB51M5MckHHmZJIpv5yKh2OuwdqFXnmPEFv1 fU98dPbCnR3ePXaj4QFJvVoc1IIkRnI11kCPWCE/yI2SZFynDFp0WC0z++PvmpVFHOuz LvzyUE+9zRBMKTKyV60+96ZZtXtwuTXSNGryOHdMyI1qicJJS53o5g+8jP4YbAzCNrMQ ljaw== X-Gm-Message-State: AE9vXwNifIOiTS08Y2/1VY+wShJ47CtjrIdyGyfGrTS3kr5/GIVKlsKhVCNaTndQfvR+uA== X-Received: by 10.66.25.74 with SMTP id a10mr35434883pag.151.1474166481673; Sat, 17 Sep 2016 19:41:21 -0700 (PDT) Received: from localhost.localdomain (218-164-26-141.dynamic.hinet.net. [218.164.26.141]) by smtp.gmail.com with ESMTPSA id n3sm21639890paf.13.2016.09.17.19.41.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Sep 2016 19:41:20 -0700 (PDT) From: Axel Lin To: MyungJoo Ham Cc: Kyungmin Park , Lin Huang , Chanwoo Choi , linux-pm@vger.kernel.org, Axel Lin Subject: [PATCH] PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove Date: Sun, 18 Sep 2016 10:41:05 +0800 Message-Id: <1474166465-18736-1-git-send-email-axel.lin@ingics.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Current code uses devm_regulator_get() in .probe so a regulator_put() will be automatically called when unload the module. Remove the explictly regulator_put() call and then we can also remove rk3399_dmcfreq_remove(). Signed-off-by: Axel Lin Reviewed-by: Chanwoo Choi --- drivers/devfreq/rk3399_dmc.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c index 54d65f2..e24b73d 100644 --- a/drivers/devfreq/rk3399_dmc.c +++ b/drivers/devfreq/rk3399_dmc.c @@ -450,15 +450,6 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev) return 0; } -static int rk3399_dmcfreq_remove(struct platform_device *pdev) -{ - struct rk3399_dmcfreq *dmcfreq = platform_get_drvdata(pdev); - - regulator_put(dmcfreq->vdd_center); - - return 0; -} - static const struct of_device_id rk3399dmc_devfreq_of_match[] = { { .compatible = "rockchip,rk3399-dmc" }, { }, @@ -466,7 +457,6 @@ static const struct of_device_id rk3399dmc_devfreq_of_match[] = { static struct platform_driver rk3399_dmcfreq_driver = { .probe = rk3399_dmcfreq_probe, - .remove = rk3399_dmcfreq_remove, .driver = { .name = "rk3399-dmc-freq", .pm = &rk3399_dmcfreq_pm,