Skip to content

Commit

Permalink
ata: libahci: replace obsolete simple_strtoul() with kstrtouint()
Browse files Browse the repository at this point in the history
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Daeseok Youn authored and Tejun Heo committed Feb 20, 2014
1 parent 35186d0 commit b2a52b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/ata/libahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b2a52b6

Please sign in to comment.