From: Daeseok Youn Date: Wed, 19 Feb 2014 23:28:45 +0000 (+0900) Subject: ata: libahci: replace obsolete simple_strtoul() with kstrtouint() X-Git-Tag: firefly_0821_release~176^2~4215^2~55 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b2a52b6a0a03000d07edb359b4059d4d871a7602;p=firefly-linux-kernel-4.4.55.git ata: libahci: replace obsolete simple_strtoul() with kstrtouint() Signed-off-by: Daeseok Youn Signed-off-by: Tejun Heo --- diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 0cff1167c83c..956851f0d44f 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -1031,12 +1031,13 @@ static ssize_t ahci_led_show(struct ata_port *ap, char *buf) static ssize_t ahci_led_store(struct ata_port *ap, const char *buf, size_t size) { - int state; + unsigned int state; int pmp; struct ahci_port_priv *pp = ap->private_data; struct ahci_em_priv *emp; - state = simple_strtoul(buf, NULL, 0); + if (kstrtouint(buf, 0, &state) < 0) + return -EINVAL; /* get the slot number from the message */ pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8;