Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84498
b: refs/heads/master
c: ce9c2f4
h: refs/heads/master
v: v3
  • Loading branch information
Robert P. J. Day authored and Mark M. Hoffman committed Feb 8, 2008
1 parent 9d8ba7f commit fa682e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5aebefb08682ebd67ea0b902950d00169e1451cb
refs/heads/master: ce9c2f449b9e6b68d3a71ba146d64c44c8945d8d
4 changes: 1 addition & 3 deletions trunk/drivers/hwmon/adt7470.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ I2C_CLIENT_INSMOD_1(adt7470);
/* sleep 1s while gathering temperature data */
#define TEMP_COLLECTION_TIME 1000

#define power_of_2(x) (((x) & ((x) - 1)) == 0)

/* datasheet says to divide this number by the fan reading to get fan rpm */
#define FAN_PERIOD_TO_RPM(x) ((90000 * 60) / (x))
#define FAN_RPM_TO_PERIOD FAN_PERIOD_TO_RPM
Expand Down Expand Up @@ -677,7 +675,7 @@ static int cvt_auto_temp(int input)
{
if (input == ADT7470_PWM_ALL_TEMPS)
return 0;
if (input < 1 || !power_of_2(input))
if (input < 1 || !is_power_of_2(input))
return -EINVAL;
return ilog2(input) + 1;
}
Expand Down

0 comments on commit fa682e0

Please sign in to comment.