Commit 4b43eb67 authored by Jingoo Han's avatar Jingoo Han Committed by Anton Vorontsov

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: default avatarJingoo Han <jg1.han@samsung.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent d211c6e8
...@@ -2465,9 +2465,9 @@ static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf, ...@@ -2465,9 +2465,9 @@ static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf,
size_t count) size_t count)
{ {
unsigned long charge_full; unsigned long charge_full;
ssize_t ret = -EINVAL; ssize_t ret;
ret = strict_strtoul(buf, 10, &charge_full); ret = kstrtoul(buf, 10, &charge_full);
dev_dbg(di->dev, "Ret %zd charge_full %lu", ret, charge_full); dev_dbg(di->dev, "Ret %zd charge_full %lu", ret, charge_full);
...@@ -2489,7 +2489,7 @@ static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf, ...@@ -2489,7 +2489,7 @@ static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf,
unsigned long charge_now; unsigned long charge_now;
ssize_t ret; ssize_t ret;
ret = strict_strtoul(buf, 10, &charge_now); ret = kstrtoul(buf, 10, &charge_now);
dev_dbg(di->dev, "Ret %zd charge_now %lu was %d", dev_dbg(di->dev, "Ret %zd charge_now %lu was %d",
ret, charge_now, di->bat_cap.prev_mah); ret, charge_now, di->bat_cap.prev_mah);
......
...@@ -191,9 +191,9 @@ static ssize_t set_usblim(struct device *dev, ...@@ -191,9 +191,9 @@ static ssize_t set_usblim(struct device *dev,
unsigned long ma; unsigned long ma;
int ret; int ret;
ret = strict_strtoul(buf, 10, &ma); ret = kstrtoul(buf, 10, &ma);
if (ret) if (ret)
return -EINVAL; return ret;
pcf50633_mbc_usb_curlim_set(mbc->pcf, ma); pcf50633_mbc_usb_curlim_set(mbc->pcf, ma);
...@@ -228,9 +228,9 @@ static ssize_t set_chglim(struct device *dev, ...@@ -228,9 +228,9 @@ static ssize_t set_chglim(struct device *dev,
if (!mbc->pcf->pdata->charger_reference_current_ma) if (!mbc->pcf->pdata->charger_reference_current_ma)
return -ENODEV; return -ENODEV;
ret = strict_strtoul(buf, 10, &ma); ret = kstrtoul(buf, 10, &ma);
if (ret) if (ret)
return -EINVAL; return ret;
mbcc5 = (ma << 8) / mbc->pcf->pdata->charger_reference_current_ma; mbcc5 = (ma << 8) / mbc->pcf->pdata->charger_reference_current_ma;
if (mbcc5 > 255) if (mbcc5 > 255)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment