From patchwork Wed Mar 4 12:05:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 5935861 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@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 184F99F749 for ; Wed, 4 Mar 2015 12:06:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42BE12011D for ; Wed, 4 Mar 2015 12:05:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35A752028D for ; Wed, 4 Mar 2015 12:05:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933148AbbCDMF4 (ORCPT ); Wed, 4 Mar 2015 07:05:56 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:49506 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932803AbbCDMFz (ORCPT ); Wed, 4 Mar 2015 07:05:55 -0500 Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YT83d-0006gj-Ce; Wed, 04 Mar 2015 12:05:46 +0000 Received: from broonie by debutante with local (Exim 4.84) (envelope-from ) id 1YT83Z-0004LC-Ma; Wed, 04 Mar 2015 12:05:41 +0000 From: Mark Brown To: Javi Merino , Eduardo Valentin , Zhang Rui Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown Date: Wed, 4 Mar 2015 12:05:39 +0000 Message-Id: <1425470739-16651-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.1.4 X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Subject: [PATCH] thermal: Fix build for !CONFIG_THERMAL X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) 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 Commit ddd4dd8ddf784 (thermal: extend the cooling device API to include power information) added stubs for newly introduced functions when !CONFIG_THERMAL but did not provide names for the parameters which is a syntax error causing build errors in such configurations. Add names to fix the issue. Also remove an extra semicolon from power_actor_set_power() which also breaks the build and declare the functions as static inline to avoid both multiple definitions and sparse warnings. Signed-off-by: Mark Brown --- include/linux/thermal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 4fb31db70b6f..48131730187b 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -405,11 +405,11 @@ void thermal_notify_framework(struct thermal_zone_device *, int); #else static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) { return false; } -int power_actor_get_max_power(struct thermal_cooling_device *, +static inline int power_actor_get_max_power(struct thermal_cooling_device *cdev, struct thermal_zone_device *tz, u32 *max_power) { return 0; } -int power_actor_set_power(struct thermal_cooling_device *, - struct thermal_instance *, u32); +static inline int power_actor_set_power(struct thermal_cooling_device *cdev, + struct thermal_instance *instance, u32 power) { return 0; } static inline struct thermal_zone_device *thermal_zone_device_register( const char *type, int trips, int mask, void *devdata,