public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Javi Merino <javi.merino@arm.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mark Brown <broonie@kernel.org>
Subject: [PATCH] thermal: Fix build for !CONFIG_THERMAL
Date: Wed,  4 Mar 2015 12:05:39 +0000	[thread overview]
Message-ID: <1425470739-16651-1-git-send-email-broonie@kernel.org> (raw)

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 <broonie@kernel.org>
---
 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,
-- 
2.1.4


             reply	other threads:[~2015-03-04 12:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 12:05 Mark Brown [this message]
2015-03-04 16:02 ` [PATCH] thermal: Fix build for !CONFIG_THERMAL Javi Merino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425470739-16651-1-git-send-email-broonie@kernel.org \
    --to=broonie@kernel.org \
    --cc=edubezval@gmail.com \
    --cc=javi.merino@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox