Commit b2a52b6a authored by Daeseok Youn's avatar Daeseok Youn Committed by Tejun Heo

ata: libahci: replace obsolete simple_strtoul() with kstrtouint()

Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 35186d05
...@@ -1031,12 +1031,13 @@ static ssize_t ahci_led_show(struct ata_port *ap, char *buf) ...@@ -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, static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
size_t size) size_t size)
{ {
int state; unsigned int state;
int pmp; int pmp;
struct ahci_port_priv *pp = ap->private_data; struct ahci_port_priv *pp = ap->private_data;
struct ahci_em_priv *emp; 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 */ /* get the slot number from the message */
pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8; pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment