Commit ebec05bdc4f7d3da852aa86fb54b163d9aeb9848
1 parent
cccfc9c4bb
Exists in
master
and in
7 other branches
hwmon: (g760a) Make rpm_from_cnt static
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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/hwmon/g760a.c
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 | #define PWM_FROM_CNT(cnt) (0xff-(cnt)) |
69 | 69 | #define PWM_TO_CNT(pwm) (0xff-(pwm)) |
70 | 70 | |
71 | -unsigned int rpm_from_cnt(u8 val, u32 clk, u16 div) | |
71 | +static inline unsigned int rpm_from_cnt(u8 val, u32 clk, u16 div) | |
72 | 72 | { |
73 | 73 | return ((val == 0x00) ? 0 : ((clk*30)/(val*div))); |
74 | 74 | } |