libata: replace strict_strtol() with kstrtol()
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>
This commit is contained in:
Родитель
eac27f04a7
Коммит
42b9ab7ab7
|
@ -206,8 +206,10 @@ static ssize_t ata_scsi_park_store(struct device *device,
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = strict_strtol(buf, 10, &input);
|
rc = kstrtol(buf, 10, &input);
|
||||||
if (rc || input < -2)
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
if (input < -2)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (input > ATA_TMOUT_MAX_PARK) {
|
if (input > ATA_TMOUT_MAX_PARK) {
|
||||||
rc = -EOVERFLOW;
|
rc = -EOVERFLOW;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче