power: supply: bq24735: always check for AC adapter presence in probe
authorPeter Rosin <peda@axentia.se>
Tue, 20 Dec 2016 11:33:02 +0000 (12:33 +0100)
committerSebastian Reichel <sre@kernel.org>
Wed, 4 Jan 2017 21:00:52 +0000 (22:00 +0100)
commita7d143d42b3d88862e49a67716187c556fb4624b
treecb599c746ceee8eb7247b5ef6c4de27a4ea79eba
parenta07bea32c612bf32b7f36c0eb0b1e2f5c444183e
power: supply: bq24735: always check for AC adapter presence in probe

So what if there is a status_gpio specified? bq24735_charger_is_present()
do have a working fallback for the case of no status_gpio.

Simplify this by not special casing setups w/o status_gpio, folding
two consecutive if-blocks in the process.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/bq24735-charger.c