Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752593AbbBRKJF (ORCPT ); Wed, 18 Feb 2015 05:09:05 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:35506 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbbBRKJC (ORCPT ); Wed, 18 Feb 2015 05:09:02 -0500 X-AuditID: cbfee61a-f79c06d000004e71-0f-54e464bb12dd From: Lukasz Majewski To: Eduardo Valentin , Kamil Debski , Jean Delvare , Guenter Roeck , Kukjin Kim Cc: lm-sensors@lm-sensors.org, Linux PM list , "linux-samsung-soc@vger.kernel.org" , devicetree@vger.kernel.org, Lukasz Majewski , Kukjin Kim , linux-kernel@vger.kernel.org, Sjoerd Simons , Abhilash Kesavan , Abhilash Kesavan , Lukasz Majewski Subject: [PATCH v4 1/8] thermal: Provide stub for thermal_of_cooling_device_register() function Date: Wed, 18 Feb 2015 11:07:29 +0100 Message-id: <1424254056-5904-2-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1424254056-5904-1-git-send-email-l.majewski@samsung.com> References: <1418897591-18332-1-git-send-email-l.majewski@samsung.com> <1424254056-5904-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRmVeSWpSXmKPExsVy+t9jAd3dKU9CDG7NtbF4vGYxk8X8I+dY LeZfucZqsfTuJzaLH68vsFms+atk0bvgKptF/+PXzBZvHnFbvHm4mdHi8q45bBafe48wWsw4 v4/J4snCM0wWd6btZbOYfvwtq4OAx9/n11k8ds66y+6xaVUnm8eDibvZPNZNe8vssfN7A7tH 35ZVjB6bT1d7fN4kF8AZxWWTkpqTWZZapG+XwJXR8KKZtaBZoGLG4Y+sDYzHeLsYOTkkBEwk 9q/fzwhhi0lcuLeerYuRi0NIYBGjxJWrhxghnC4miYXbJ7ODVLEJ6El8vvuUCSQhIrCdUWLF vG9gLcwC15gl9m0+CpTh4BAWSJTo+FYE0sAioCqxee1OJhCbV8BVYvXXHlaIdYoS3c8msIHY nAJuElv3LGOH2NbEKDFv6U/mCYy8CxgZVjGKphYkFxQnpeca6hUn5haX5qXrJefnbmIEh/Uz qR2MKxssDjEKcDAq8fA2/H4cIsSaWFZcmXuIUYKDWUmENz7+SYgQb0piZVVqUX58UWlOavEh RmkOFiVxXiX7thAhgfTEktTs1NSC1CKYLBMHp1QDY/C+1X0LXqq7Phd+PevQ7rvaJxveCJRW bA9Y+Te0QKnXSixGdY5sW1CDuFu+xOFTR41dbgjGy/9V+zWHm7N3jVB0ivjT80Kf9/Edv2i1 2Kp6X9W8bj7Bh7vyZG/e5rjEv77jyH3t/YWJL1YtsEpdzBV1eVJDxuM/7/leLFhwL1LweXuH PE/5USWW4oxEQy3mouJEALKKeaZnAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2238 Lines: 63 Odroid U3 fan can work without being registered as OF cooling device (with CONFIG_THERMAL_OF disabled). In this situation it can be controlled via PWM entry at /sys/class/hwmon/hwmon0/pwm1. Therefore, the thermal_of_cooling_device_register() function needs a stub to allow clean compilation. Signed-off-by: Lukasz Majewski --- Changes for v2: - None Changes for v3: - Provide stub declaration when CONFIG_THERMAL is not set Changes for v4: - None --- include/linux/thermal.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index fc52e30..eacf2de 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -293,6 +293,20 @@ struct thermal_trip { }; /* Function declarations */ +#ifdef CONFIG_THERMAL +struct thermal_cooling_device * +thermal_of_cooling_device_register(struct device_node *np, + char *type, void *devdata, + const struct thermal_cooling_device_ops *); +#else +static inline struct thermal_cooling_device * +thermal_of_cooling_device_register(struct device_node *np, + char *type, void *devdata, + const struct thermal_cooling_device_ops *ops) +{ + return NULL; +} +#endif #ifdef CONFIG_THERMAL_OF struct thermal_zone_device * thermal_zone_of_sensor_register(struct device *dev, int id, void *data, @@ -328,9 +342,6 @@ void thermal_zone_device_update(struct thermal_zone_device *); struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, const struct thermal_cooling_device_ops *); -struct thermal_cooling_device * -thermal_of_cooling_device_register(struct device_node *np, char *, void *, - const struct thermal_cooling_device_ops *); void thermal_cooling_device_unregister(struct thermal_cooling_device *); struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name); int thermal_zone_get_temp(struct thermal_zone_device *tz, unsigned long *temp); -- 2.0.0.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/