From patchwork Mon Apr 3 13:47:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 9659595 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 3949360352 for ; Mon, 3 Apr 2017 13:48:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29B3C283F4 for ; Mon, 3 Apr 2017 13:48:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E93528423; Mon, 3 Apr 2017 13:48:12 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 6C70A28403 for ; Mon, 3 Apr 2017 13:48:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753413AbdDCNry (ORCPT ); Mon, 3 Apr 2017 09:47:54 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:37653 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753366AbdDCNru (ORCPT ); Mon, 3 Apr 2017 09:47:50 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0ONU017C46BJAQ40@mailout3.samsung.com>; Mon, 03 Apr 2017 22:47:43 +0900 (KST) Received: from epsmges1p1.samsung.com (unknown [182.195.42.53]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20170403134742epcas1p43609061e2a258cabee542dcc552cb709~x50t2WtSr2841928419epcas1p42; Mon, 3 Apr 2017 13:47:42 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 45.A1.11252.E7252E85; Mon, 3 Apr 2017 22:47:42 +0900 (KST) Received: from epcpsbgm1new.samsung.com (u26.gpu120.samsung.co.kr [203.254.230.26]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20170403134742epcas1p42a7ea96e9c27d5752796ca9ff86d0f1e~x50tXwl8u3072630726epcas1p4f; Mon, 3 Apr 2017 13:47:42 +0000 (GMT) X-AuditID: b6c32a35-f79806d000002bf4-73-58e2527eaa31 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 0F.17.05715.E7252E85; Mon, 3 Apr 2017 22:47:42 +0900 (KST) Received: from AMDC3058.DIGITAL.local ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0ONU003916AWJW90@mmp2.samsung.com>; Mon, 03 Apr 2017 22:47:42 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Thierry Reding , Jean Delvare , Guenter Roeck , Kamil Debski Cc: Tomasz Figa , linux-pwm@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH 3/3] hwmon: pwm-fan: remove no longer needed suspend/resume code Date: Mon, 03 Apr 2017 15:47:06 +0200 Message-id: <1491227226-12972-4-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1491227226-12972-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHIsWRmVeSWpSXmKPExsWy7bCmgW5d0KMIg4X3zCw2zljPanF2Q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o+oYEKSmUJeaUAnlGBmjAwTnAPVhJ3y7BLePV+peMBW28FbtXT2ZsYLzJ1cXIwSEhYCKx usGvi5ETyBSTuHBvPVsXIxeHkMAsRomu9yfYQBJCAr8YJVYeMAKx2QSsJCa2r2IEKRIRmM4o MWPmdlYQh1lgH6PE6q4pzCBVwgIBEhdv9rGD2CwCqhIzz30Cm8Qr4CFxYdMERoh1chInj01m BbE5BTwl3k9cxQyxzUNiU/Mk1gmMvAsYGVYxSqQWJBcUJ6XnGuallusVJ+YWl+al6yXn525i BIf+M6kdjAd3uR9iFOBgVOLhXeD0KEKINbGsuDL3EKMEB7OSCO8EP6AQb0piZVVqUX58UWlO avEhRlOgwyYyS4km5wPjMq8k3tDE3MTc2MDC3NLSxEhJnLdx9rNwIYH0xJLU7NTUgtQimD4m Dk6pBsaVCfG7D0oyry63e6gvsmKmVVVgwnYzO7FC14p9+SteMjQfjJwx4eN9t4XKJ16pJ16r TTxvNO1LVOMc456cq2JH+89OZihyLBJa5Xwr6X1/z+aQFB3l5QqJV3WqLs72Xt+a6CT8Iqxq d9yfss+ZHzprny3g3cjhbJM4JTNrWn/dc1mX5xe5PymxFGckGmoxFxUnAgCOA1lrkwIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170403134742epcas1p42a7ea96e9c27d5752796ca9ff86d0f1e X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?QmFydGxvbWllaiBab2xuaWVya2lld2ljehtTUlBPTC1LZXJu?= =?UTF-8?B?ZWwgKFRQKRvsgrzshLHsoITsnpAbU2VuaW9yIFNvZnR3YXJlIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?QmFydGxvbWllaiBab2xuaWVya2lld2ljehtTUlBPTC1LZXJu?= =?UTF-8?B?ZWwgKFRQKRtTYW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBF?= =?UTF-8?B?bmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 101P X-HopCount: 7 X-CMS-RootMailID: 20170403134742epcas1p42a7ea96e9c27d5752796ca9ff86d0f1e X-RootMTR: 20170403134742epcas1p42a7ea96e9c27d5752796ca9ff86d0f1e References: <1491227226-12972-1-git-send-email-b.zolnierkie@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The suspend/resume is now properly handled by pwm-samsung driver (pwm-fan is currently only used by ARM Exynos boards) and the old code only handles ctx->pwm_value != 0 case. Just remove it. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Guenter Roeck --- drivers/hwmon/pwm-fan.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index f9af393..9dc40f3 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -302,37 +302,6 @@ static int pwm_fan_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int pwm_fan_suspend(struct device *dev) -{ - struct pwm_fan_ctx *ctx = dev_get_drvdata(dev); - - if (ctx->pwm_value) - pwm_disable(ctx->pwm); - return 0; -} - -static int pwm_fan_resume(struct device *dev) -{ - struct pwm_fan_ctx *ctx = dev_get_drvdata(dev); - struct pwm_args pargs; - unsigned long duty; - int ret; - - if (ctx->pwm_value == 0) - return 0; - - pwm_get_args(ctx->pwm, &pargs); - duty = DIV_ROUND_UP(ctx->pwm_value * (pargs.period - 1), MAX_PWM); - ret = pwm_config(ctx->pwm, duty, pargs.period); - if (ret) - return ret; - return pwm_enable(ctx->pwm); -} -#endif - -static SIMPLE_DEV_PM_OPS(pwm_fan_pm, pwm_fan_suspend, pwm_fan_resume); - static const struct of_device_id of_pwm_fan_match[] = { { .compatible = "pwm-fan", }, {}, @@ -344,7 +313,6 @@ static int pwm_fan_resume(struct device *dev) .remove = pwm_fan_remove, .driver = { .name = "pwm-fan", - .pm = &pwm_fan_pm, .of_match_table = of_pwm_fan_match, }, };