Commit ebec05bd authored by Jean Delvare's avatar Jean Delvare
Browse files

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: default avatarJean Delvare <khali@linux-fr.org>
Cc: Herbert Valerio Riedel <hvr@gnu.org>
Acked-by: default avatarMartin Michlmayr <tbm@cyrius.com>
parent cccfc9c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -68,7 +68,7 @@ struct g760a_data {
#define PWM_FROM_CNT(cnt)	(0xff-(cnt))
#define PWM_FROM_CNT(cnt)	(0xff-(cnt))
#define PWM_TO_CNT(pwm)		(0xff-(pwm))
#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)));
	return ((val == 0x00) ? 0 : ((clk*30)/(val*div)));
}
}