power: supply: charger-manager: Verify polling interval only when polling requested
authorLadislav Michl <ladis@linux-mips.org>
Wed, 21 Mar 2018 15:50:00 +0000 (16:50 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Wed, 25 Apr 2018 22:01:27 +0000 (00:01 +0200)
commit111242d6e1aa0cbdf1dd91fff6f210ae0d4d01bc
tree403c56798556b808f994b176468e292e746a6900
parent39b4fb8056e60a27ba0963dd557d5e61909f5b07
power: supply: charger-manager: Verify polling interval only when polling requested

Driver bails out with -EINVAL when no polling specififaion is requested.
Fix that by verifing polling interval only if polling_mode is different
from CM_POLL_DISABLE.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/charger-manager.c