Skip to content

Commit

Permalink
Staging: zram/zram_sysfs.c: Fixed call of obsolete function strict_st…
Browse files Browse the repository at this point in the history
…rtoX

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>
  • Loading branch information
Sergey Datsevich authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent 6e8087a commit 04e7bba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/zram/zram_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 04e7bba

Please sign in to comment.