X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fhwmon%2Fadt7470.c;h=a2155605e318d7dd0a1239b5541787ef52051d7e;hb=28292e79dcecac3688530a7f78d1930b78fac96b;hp=9810aaa0489d44619e677e6808fc920569a32b64;hpb=f563d53c30f3e60cde3a194cc1a87284ee0b3366;p=powerpc.git diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c index 9810aaa048..a2155605e3 100644 --- a/drivers/hwmon/adt7470.c +++ b/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; }