diff options
| author | Phil Reid <preid@electromag.com.au> | 2016-09-19 21:01:12 -0400 |
|---|---|---|
| committer | Sebastian Reichel <sre@kernel.org> | 2016-09-20 20:04:47 -0400 |
| commit | 389958bb6be8b08c9f6d350dcaa9fc127123eada (patch) | |
| tree | d2cbb8cd4aa37f7b2cd803da42bef8936ee67d8d /include | |
| parent | bb1e41ba324fe4bb71be3ef8d0eda29f0ba44ffa (diff) | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/power/sbs-battery.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/power/sbs-battery.h b/include/linux/power/sbs-battery.h index 811f1a0c00cb..519b8b43239a 100644 --- a/include/linux/power/sbs-battery.h +++ b/include/linux/power/sbs-battery.h | |||
| @@ -31,8 +31,8 @@ | |||
| 31 | * external change notification | 31 | * external change notification |
| 32 | */ | 32 | */ |
| 33 | struct sbs_platform_data { | 33 | struct sbs_platform_data { |
| 34 | int i2c_retry_count; | 34 | u32 i2c_retry_count; |
| 35 | int poll_retry_count; | 35 | u32 poll_retry_count; |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | #endif | 38 | #endif |
