OSDN Git Service

power: supply: sbs-battery: Cleanup removal of chip->pdata
authorPhil Reid <preid@electromag.com.au>
Tue, 20 Sep 2016 01:01:12 +0000 (09:01 +0800)
committerSebastian Reichel <sre@kernel.org>
Wed, 21 Sep 2016 00:04:47 +0000 (02:04 +0200)
commit389958bb6be8b08c9f6d350dcaa9fc127123eada
treed2cbb8cd4aa37f7b2cd803da42bef8936ee67d8d
parentbb1e41ba324fe4bb71be3ef8d0eda29f0ba44ffa
power: supply: sbs-battery: Cleanup removal of chip->pdata

There where still a few lingering references to pdata after commit
power: supply: sbs-battery: simplify DT parsing.

Remove pdata from struct·sbs_info and conditional checks to ser if this
was set from the i2c read / write functions.
Instead of call max in each function for incrementing poll_retry_count
do it once in the probe function.
Fixup null pointer dereference in to pdata in sbs_external_power_changed.
Change retry counts to u32 to avoid need for max.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/sbs-battery.c
include/linux/power/sbs-battery.h