Staging: zram/zram_sysfs.c: Fixed call of obsolete function strict_strtoX
authorSergey Datsevich <snsedats@faui49man4.informatik.uni-erlangen.de>
Wed, 7 Dec 2011 18:06:37 +0000 (19:06 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Dec 2011 22:59:48 +0000 (14:59 -0800)
As reported by checkpatch.pl strict_strtoX is obsolet and should be
replaced by kstrtoX.

Signed-off-by: Sergey Datsevich <srgdts@gmail.com>
Signed-off-by: Bjoern Meier <bjoernmeier@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/zram/zram_sysfs.c

index 0ea8ed2..d521122 100644 (file)
@@ -58,7 +58,7 @@ static ssize_t disksize_store(struct device *dev,
        u64 disksize;
        struct zram *zram = dev_to_zram(dev);
 
-       ret = strict_strtoull(buf, 10, &disksize);
+       ret = kstrtoull(buf, 10, &disksize);
        if (ret)
                return ret;
 
@@ -88,7 +88,7 @@ static ssize_t reset_store(struct device *dev,
                struct device_attribute *attr, const char *buf, size_t len)
 {
        int ret;
-       unsigned long do_reset;
+       unsigned short do_reset;
        struct zram *zram;
        struct block_device *bdev;
 
@@ -99,7 +99,7 @@ static ssize_t reset_store(struct device *dev,
        if (bdev->bd_holders)
                return -EBUSY;
 
-       ret = strict_strtoul(buf, 10, &do_reset);
+       ret = kstrtou16(buf, 10, &do_reset);
        if (ret)
                return ret;