Skip to content

Commit

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

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Jingoo Han authored and Tejun Heo committed Jul 22, 2013
1 parent eac27f0 commit 42b9ab7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ static ssize_t ata_scsi_park_store(struct device *device,
unsigned long flags;
int rc;

rc = strict_strtol(buf, 10, &input);
if (rc || input < -2)
rc = kstrtol(buf, 10, &input);
if (rc)
return rc;
if (input < -2)
return -EINVAL;
if (input > ATA_TMOUT_MAX_PARK) {
rc = -EOVERFLOW;
Expand Down

0 comments on commit 42b9ab7

Please sign in to comment.