summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorDaniel Perez <danielperezdeandres@gmail.com>2017-02-15 16:46:21 +0100
committerSebastian Reichel <sre@kernel.org>2017-04-14 01:41:34 +0200
commitdba83476966b725736f99afb7d80c945c06ba6dc (patch)
tree77d1acb06f28ed4cec0f2f9eae7302015f3c4088 /drivers/power
parentpower: supply: ab8500: Replaced spaces with tabs in indent (diff)
downloadlinux-dba83476966b725736f99afb7d80c945c06ba6dc.tar.xz
linux-dba83476966b725736f99afb7d80c945c06ba6dc.zip
power: supply: sbs-charger: simplified bool function
Signed-off-by: Daniel Perez <danielperezdeandres@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/sbs-charger.c5
1 files changed, 1 insertions, 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)