diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-06-03 05:05:05 -0400 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-06-06 20:35:38 -0400 |
commit | 4b43eb67ae246b9a846c46e5ff96ea0212ae7a51 (patch) | |
tree | 8f0cdab10714899bdb40f3ca84936e74304dc913 /drivers/power | |
parent | d211c6e82435dfa4ae9f4d80bb2ee75930bde5d4 (diff) |
power_supply: Replace strict_strtoul() with kstrtoul()
The usage of strict_strtoul() is not preferred, because strict_strtoul()
is obsolete. Thus, kstrtoul() should be used.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/ab8500_fg.c | 6 | ||||
-rw-r--r-- | drivers/power/pcf50633-charger.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c index 1263638b102d..754970717c31 100644 --- a/drivers/power/ab8500_fg.c +++ b/drivers/power/ab8500_fg.c | |||
@@ -2465,9 +2465,9 @@ static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf, | |||
2465 | size_t count) | 2465 | size_t count) |
2466 | { | 2466 | { |
2467 | unsigned long charge_full; | 2467 | unsigned long charge_full; |
2468 | ssize_t ret = -EINVAL; | 2468 | ssize_t ret; |
2469 | 2469 | ||
2470 | ret = strict_strtoul(buf, 10, &charge_full); | 2470 | ret = kstrtoul(buf, 10, &charge_full); |
2471 | 2471 | ||
2472 | dev_dbg(di->dev, "Ret %zd charge_full %lu", ret, charge_full); | 2472 | dev_dbg(di->dev, "Ret %zd charge_full %lu", ret, charge_full); |
2473 | 2473 | ||
@@ -2489,7 +2489,7 @@ static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf, | |||
2489 | unsigned long charge_now; | 2489 | unsigned long charge_now; |
2490 | ssize_t ret; | 2490 | ssize_t ret; |
2491 | 2491 | ||
2492 | ret = strict_strtoul(buf, 10, &charge_now); | 2492 | ret = kstrtoul(buf, 10, &charge_now); |
2493 | 2493 | ||
2494 | dev_dbg(di->dev, "Ret %zd charge_now %lu was %d", | 2494 | dev_dbg(di->dev, "Ret %zd charge_now %lu was %d", |
2495 | ret, charge_now, di->bat_cap.prev_mah); | 2495 | ret, charge_now, di->bat_cap.prev_mah); |
diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c index 17fd77f24b2a..771c4f0fb8ac 100644 --- a/drivers/power/pcf50633-charger.c +++ b/drivers/power/pcf50633-charger.c | |||
@@ -191,9 +191,9 @@ static ssize_t set_usblim(struct device *dev, | |||
191 | unsigned long ma; | 191 | unsigned long ma; |
192 | int ret; | 192 | int ret; |
193 | 193 | ||
194 | ret = strict_strtoul(buf, 10, &ma); | 194 | ret = kstrtoul(buf, 10, &ma); |
195 | if (ret) | 195 | if (ret) |
196 | return -EINVAL; | 196 | return ret; |
197 | 197 | ||
198 | pcf50633_mbc_usb_curlim_set(mbc->pcf, ma); | 198 | pcf50633_mbc_usb_curlim_set(mbc->pcf, ma); |
199 | 199 | ||
@@ -228,9 +228,9 @@ static ssize_t set_chglim(struct device *dev, | |||
228 | if (!mbc->pcf->pdata->charger_reference_current_ma) | 228 | if (!mbc->pcf->pdata->charger_reference_current_ma) |
229 | return -ENODEV; | 229 | return -ENODEV; |
230 | 230 | ||
231 | ret = strict_strtoul(buf, 10, &ma); | 231 | ret = kstrtoul(buf, 10, &ma); |
232 | if (ret) | 232 | if (ret) |
233 | return -EINVAL; | 233 | return ret; |
234 | 234 | ||
235 | mbcc5 = (ma << 8) / mbc->pcf->pdata->charger_reference_current_ma; | 235 | mbcc5 = (ma << 8) / mbc->pcf->pdata->charger_reference_current_ma; |
236 | if (mbcc5 > 255) | 236 | if (mbcc5 > 255) |