summaryrefslogtreecommitdiff
path: root/drivers/hwmon/g760a.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-03-05 22:17:22 +0100
committerJean Delvare <khali@linux-fr.org>2010-03-05 22:17:22 +0100
commitebec05bdc4f7d3da852aa86fb54b163d9aeb9848 (patch)
tree54bd0d9327a4b83651c2f5d640848f304ee6ff0f /drivers/hwmon/g760a.c
parentcccfc9c4bb3c7888f8249b36e08d6e115238c613 (diff)
downloadlwn-ebec05bdc4f7d3da852aa86fb54b163d9aeb9848.tar.gz
lwn-ebec05bdc4f7d3da852aa86fb54b163d9aeb9848.zip
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>
Diffstat (limited to 'drivers/hwmon/g760a.c')
-rw-r--r--drivers/hwmon/g760a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/g760a.c b/drivers/hwmon/g760a.c
index 19c01a49f6be..09ea12e0a551 100644
--- a/drivers/hwmon/g760a.c
+++ b/drivers/hwmon/g760a.c
@@ -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)));
}