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 18/52] kstrtox: convert drivers/gpu/drm/nouveau/
    Date

    Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
    ---
    drivers/gpu/drm/nouveau/nouveau_pm.c | 16 ++++++++++------
    1 files changed, 10 insertions(+), 6 deletions(-)

    diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
    index f05c0cd..9fb5b6e 100644
    --- a/drivers/gpu/drm/nouveau/nouveau_pm.c
    +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
    @@ -319,10 +319,12 @@ nouveau_hwmon_set_max_temp(struct device *d, struct device_attribute *a,
    struct drm_nouveau_private *dev_priv = dev->dev_private;
    struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
    struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp;
    - long value;
    + int value;
    + int rv;

    - if (strict_strtol(buf, 10, &value) == -EINVAL)
    - return count;
    + rv = kstrtoint(buf, 10, &value);
    + if (rv < 0)
    + return rv;

    temp->down_clock = value/1000;

    @@ -354,10 +356,12 @@ nouveau_hwmon_set_critical_temp(struct device *d, struct device_attribute *a,
    struct drm_nouveau_private *dev_priv = dev->dev_private;
    struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
    struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp;
    - long value;
    + int value;
    + int rv;

    - if (strict_strtol(buf, 10, &value) == -EINVAL)
    - return count;
    + rv = kstrtoint(buf, 10, &value);
    + if (rv < 0)
    + return rv;

    temp->critical = value/1000;

    --
    1.7.3.4


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