diff options
author | Joshua Primero <jprimero@nvidia.com> | 2011-11-11 15:16:54 -0800 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-08 17:03:31 +0530 |
commit | 99cd63f81e09e6dafcba8cb5e61a5b56b258fad5 (patch) | |
tree | 578428bcd90c39de74c2ea129a497d2c4cbe3367 /include/linux/nct1008.h | |
parent | aa5203999e22df96a3722a70759053cd35c4d9d6 (diff) |
drivers: misc: nct: added stubs for nct1008
Added default stubs for nct1008 so if CONFIG_SENSORS_NCT1008
is disabled build still compiles.
Bug 901092
Reviewed-on: http://git-master/r/63923
(cherry picked from commit 6ee9996fa68011604164cf890160ec12e7bd7684)
Change-Id: Ic859c37f63b943591887bc107aa5f5c677bbb01d
Reviewed-on: http://git-master/r/64562
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
(cherry picked from commit e3b95b2b4864d12d52156f54be549cdbef6a6071)
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/66550
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'include/linux/nct1008.h')
-rw-r--r-- | include/linux/nct1008.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/nct1008.h b/include/linux/nct1008.h index 8e4b4bcc83b2..328dd7863053 100644 --- a/include/linux/nct1008.h +++ b/include/linux/nct1008.h @@ -68,6 +68,7 @@ struct nct1008_data { void *alert_data; }; +#ifdef CONFIG_SENSORS_NCT1008 int nct1008_thermal_get_temp(struct nct1008_data *data, long *temp); int nct1008_thermal_set_limits(struct nct1008_data *data, long lo_limit_milli, @@ -77,4 +78,21 @@ int nct1008_thermal_set_alert(struct nct1008_data *data, void *alert_data); int nct1008_thermal_set_shutdown_temp(struct nct1008_data *data, long shutdown_temp); +#else +static inline int nct1008_thermal_get_temp(struct nct1008_data *data, + long *temp) +{ return -EINVAL; } +static inline int nct1008_thermal_set_limits(struct nct1008_data *data, + long lo_limit_milli, + long hi_limit_milli) +{ return -EINVAL; } +static inline int nct1008_thermal_set_alert(struct nct1008_data *data, + void (*alert_func)(void *), + void *alert_data) +{ return -EINVAL; } +static inline int nct1008_thermal_set_shutdown_temp(struct nct1008_data *data, + long shutdown_temp) +{ return -EINVAL; } +#endif + #endif /* _LINUX_NCT1008_H */ |