From patchwork Sat Feb 7 00:17:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 5795411 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 8EE57BF440 for ; Sat, 7 Feb 2015 00:18:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7B4320160 for ; Sat, 7 Feb 2015 00:18:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BFB4120154 for ; Sat, 7 Feb 2015 00:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754085AbbBGARt (ORCPT ); Fri, 6 Feb 2015 19:17:49 -0500 Received: from utopia.booyaka.com ([74.50.51.50]:32916 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752664AbbBGARt (ORCPT ); Fri, 6 Feb 2015 19:17:49 -0500 Received: (qmail 14315 invoked by uid 1019); 7 Feb 2015 00:17:47 -0000 Date: Sat, 7 Feb 2015 00:17:47 +0000 (UTC) From: Paul Walmsley To: Eduardo Valentin , Zhang Rui cc: linux-pm@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] thermal: ti-soc-thermal: fix compilation warnings when !CONFIG_PM_SLEEP Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, 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 When CONFIG_PM_SLEEP=n, the following compilation warnings appear: drivers/thermal/ti-soc-thermal/ti-bandgap.c:1478:12: warning: ‘ti_bandgap_suspend’ defined but not used [-Wunused-function] static int ti_bandgap_suspend(struct device *dev) ^ drivers/thermal/ti-soc-thermal/ti-bandgap.c:1492:12: warning: ‘ti_bandgap_resume’ defined but not used [-Wunused-function] static int ti_bandgap_resume(struct device *dev) A few years ago, suspend/resume-related code was protected by CONFIG_PM. But that was changed and now it's protected by CONFIG_PM_SLEEP. Fix the warnings by converting the preprocessor test in the TI bandgap thermal sensor driver from testing CONFIG_PM to testing CONFIG_PM_SLEEP. Signed-off-by: Paul Walmsley Cc: Eduardo Valentin Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- Non-critical. Targeted for either v3.20-rc1 or v3.21-rc1. Basic test reports for a series that includes this patch (and a few other unrelated warning cleanups) is available here: http://www.pwsan.com/omap/testlogs/fix-omap-warnings-v3.21/20150206154619/ Compare to: http://www.pwsan.com/omap/testlogs/test_v3.19-rc7/20150204213018/ drivers/thermal/ti-soc-thermal/ti-bandgap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c index 634b6ce0e63a..62a5d449c388 100644 --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c @@ -1402,7 +1402,7 @@ int ti_bandgap_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int ti_bandgap_save_ctxt(struct ti_bandgap *bgp) { int i;