power: supply: sbs-charger: simplified bool function
authorDaniel Perez <danielperezdeandres@gmail.com>
Wed, 15 Feb 2017 15:46:21 +0000 (16:46 +0100)
committerSebastian Reichel <sre@kernel.org>
Thu, 13 Apr 2017 23:41:34 +0000 (01:41 +0200)
Signed-off-by: Daniel Perez <danielperezdeandres@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/sbs-charger.c

index 353765a5f44cfd8096c29edb680bc0f3d09c703e..15947dbb511e320dfd80d8e9968f313d4c54550a 100644 (file)
@@ -137,10 +137,7 @@ static enum power_supply_property sbs_properties[] = {
 
 static bool sbs_readable_reg(struct device *dev, unsigned int reg)
 {
-       if (reg < SBS_CHARGER_REG_SPEC_INFO)
-               return false;
-       else
-               return true;
+       return reg >= SBS_CHARGER_REG_SPEC_INFO;
 }
 
 static bool sbs_volatile_reg(struct device *dev, unsigned int reg)