From dba83476966b725736f99afb7d80c945c06ba6dc Mon Sep 17 00:00:00 2001 From: Daniel Perez Date: Wed, 15 Feb 2017 16:46:21 +0100 Subject: [PATCH] power: supply: sbs-charger: simplified bool function Signed-off-by: Daniel Perez Signed-off-by: Sebastian Reichel --- drivers/power/supply/sbs-charger.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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) -- 2.39.5