Skip to content

Commit

Permalink
net: can: replace strict_strtoul() with kstrtoul()
Browse files Browse the repository at this point in the history
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jingoo Han authored and David S. Miller committed Jun 3, 2013
1 parent 9a99d4a commit 0672f0a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ static ssize_t at91_sysfs_set_mb0_id(struct device *dev,
goto out;
}

err = strict_strtoul(buf, 0, &can_id);
err = kstrtoul(buf, 0, &can_id);
if (err) {
ret = err;
goto out;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/janz-ican3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ static ssize_t ican3_sysfs_set_term(struct device *dev,
unsigned long enable;
int ret;

if (strict_strtoul(buf, 0, &enable))
if (kstrtoul(buf, 0, &enable))
return -EINVAL;

ret = ican3_set_termination(mod, enable);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/slcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static void slc_bump(struct slcan *sl)

sl->rbuff[dlc_pos] = 0; /* terminate can_id string */

if (strict_strtoul(sl->rbuff+1, 16, &ultmp))
if (kstrtoul(sl->rbuff+1, 16, &ultmp))
return;

cf.can_id = ultmp;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/softing/softing_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ static ssize_t store_output(struct device *dev, struct device_attribute *attr,
unsigned long val;
int ret;

ret = strict_strtoul(buf, 0, &val);
ret = kstrtoul(buf, 0, &val);
if (ret < 0)
return ret;
val &= 0xFF;
Expand Down

0 comments on commit 0672f0a

Please sign in to comment.