From fa682e0a91253380319c0efaf801f86c7db4fbbd Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 6 Nov 2007 03:21:42 -0500 Subject: [PATCH] --- yaml --- r: 84498 b: refs/heads/master c: ce9c2f449b9e6b68d3a71ba146d64c44c8945d8d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/hwmon/adt7470.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 4f1de91d8d3d..54b40bb61853 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5aebefb08682ebd67ea0b902950d00169e1451cb +refs/heads/master: ce9c2f449b9e6b68d3a71ba146d64c44c8945d8d diff --git a/trunk/drivers/hwmon/adt7470.c b/trunk/drivers/hwmon/adt7470.c index 9810aaa0489d..a2155605e318 100644 --- a/trunk/drivers/hwmon/adt7470.c +++ b/trunk/drivers/hwmon/adt7470.c @@ -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 @@ -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; }