lkml.org 
[lkml]   [2011]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 34/52] kstrtox: convert drivers/power/
    Date

    Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
    ---
    drivers/power/pcf50633-charger.c | 4 ++--
    drivers/power/power_supply_sysfs.c | 6 +-----
    2 files changed, 3 insertions(+), 7 deletions(-)

    diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c
    index 4fa52e1..b6d9281 100644
    --- a/drivers/power/pcf50633-charger.c
    +++ b/drivers/power/pcf50633-charger.c
    @@ -191,7 +191,7 @@ static ssize_t set_usblim(struct device *dev,
    unsigned long ma;
    int ret;

    - ret = strict_strtoul(buf, 10, &ma);
    + ret = kstrtoul(buf, 10, &ma);
    if (ret)
    return -EINVAL;

    @@ -228,7 +228,7 @@ static ssize_t set_chglim(struct device *dev,
    if (!mbc->pcf->pdata->charger_reference_current_ma)
    return -ENODEV;

    - ret = strict_strtoul(buf, 10, &ma);
    + ret = kstrtoul(buf, 10, &ma);
    if (ret)
    return -EINVAL;

    diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
    index cd1f907..15d2d4a 100644
    --- a/drivers/power/power_supply_sysfs.c
    +++ b/drivers/power/power_supply_sysfs.c
    @@ -107,15 +107,11 @@ static ssize_t power_supply_store_property(struct device *dev,
    struct power_supply *psy = dev_get_drvdata(dev);
    const ptrdiff_t off = attr - power_supply_attrs;
    union power_supply_propval value;
    - long long_val;

    /* TODO: support other types than int */
    - ret = strict_strtol(buf, 10, &long_val);
    + ret = kstrtoint(buf, 10, &value.intval);
    if (ret < 0)
    return ret;
    -
    - value.intval = long_val;
    -
    ret = psy->set_property(psy, off, &value);
    if (ret < 0)
    return ret;
    --
    1.7.3.4


    \
     
     \ /
      Last update: 2011-02-05 15:45    [W:3.353 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site