From: Daniel Perez Date: Wed, 15 Feb 2017 15:46:21 +0000 (+0100) Subject: power: supply: sbs-charger: simplified bool function X-Git-Tag: v4.12-rc1~172^2~18 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dba83476966b725736f99afb7d80c945c06ba6dc;p=karo-tx-linux.git power: supply: sbs-charger: simplified bool function Signed-off-by: Daniel Perez Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/sbs-charger.c b/drivers/power/supply/sbs-charger.c index 353765a5f44c..15947dbb511e 100644 --- a/drivers/power/supply/sbs-charger.c +++ b/drivers/power/supply/sbs-charger.c @@ -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)