]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
hwmon: (g760a) Make rpm_from_cnt static
authorJean Delvare <khali@linux-fr.org>
Fri, 5 Mar 2010 21:17:22 +0000 (22:17 +0100)
committerJean Delvare <khali@linux-fr.org>
Fri, 5 Mar 2010 21:17:22 +0000 (22:17 +0100)
Function rpm_from_cnt is only used internally so it can be made
static. Make it inline while we're here, for performance reasons
(although hopefully gcc would figure out by itself...)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Herbert Valerio Riedel <hvr@gnu.org>
Acked-by: Martin Michlmayr <tbm@cyrius.com>
drivers/hwmon/g760a.c

index 19c01a49f6be09449488812ef85c6659fa70b03b..09ea12e0a55185b3e5d0699cf7922898752b70af 100644 (file)
@@ -68,7 +68,7 @@ struct g760a_data {
 #define PWM_FROM_CNT(cnt)      (0xff-(cnt))
 #define PWM_TO_CNT(pwm)                (0xff-(pwm))
 
-unsigned int rpm_from_cnt(u8 val, u32 clk, u16 div)
+static inline unsigned int rpm_from_cnt(u8 val, u32 clk, u16 div)
 {
        return ((val == 0x00) ? 0 : ((clk*30)/(val*div)));
 }