From 2a844c148e1f714ebf42cb96e1b172ce394c36c9 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Wed, 9 Jan 2013 08:09:34 -0800 Subject: hwmon: Replace SENSORS_LIMIT with clamp_val SENSORS_LIMIT and the generic clamp_val have the same functionality, and clamp_val is more efficient. This patch reduces text size by 9052 bytes and bss size by 11624 bytes for x86_64 builds. Signed-off-by: Guenter Roeck Acked-by: George Joseph Acked-by: Jean Delvare --- drivers/hwmon/jc42.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/hwmon/jc42.c') diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c index e21e43c13156..82d962488f55 100644 --- a/drivers/hwmon/jc42.c +++ b/drivers/hwmon/jc42.c @@ -237,9 +237,9 @@ static struct i2c_driver jc42_driver = { static u16 jc42_temp_to_reg(int temp, bool extended) { - int ntemp = SENSORS_LIMIT(temp, - extended ? JC42_TEMP_MIN_EXTENDED : - JC42_TEMP_MIN, JC42_TEMP_MAX); + int ntemp = clamp_val(temp, + extended ? JC42_TEMP_MIN_EXTENDED : + JC42_TEMP_MIN, JC42_TEMP_MAX); /* convert from 0.001 to 0.0625 resolution */ return (ntemp * 2 / 125) & 0x1fff; -- cgit