aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libahci.c
diff options
context:
space:
mode:
authorDaeseok Youn <daeseok.youn@gmail.com>2014-02-19 18:28:45 -0500
committerTejun Heo <tj@kernel.org>2014-02-19 19:07:55 -0500
commitb2a52b6a0a03000d07edb359b4059d4d871a7602 (patch)
tree86f074a36b604c97b12e7a2d36fcb2918a0c4fd4 /drivers/ata/libahci.c
parent35186d05838e4d828546e6182f7461674a609e08 (diff)
ata: libahci: replace obsolete simple_strtoul() with kstrtouint()
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libahci.c')
-rw-r--r--drivers/ata/libahci.c5
1 files changed, 3 insertions, 2 deletions
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)
1031static ssize_t ahci_led_store(struct ata_port *ap, const char *buf, 1031static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
1032 size_t size) 1032 size_t size)
1033{ 1033{
1034 int state; 1034 unsigned int state;
1035 int pmp; 1035 int pmp;
1036 struct ahci_port_priv *pp = ap->private_data; 1036 struct ahci_port_priv *pp = ap->private_data;
1037 struct ahci_em_priv *emp; 1037 struct ahci_em_priv *emp;
1038 1038
1039 state = simple_strtoul(buf, NULL, 0); 1039 if (kstrtouint(buf, 0, &state) < 0)
1040 return -EINVAL;
1040 1041
1041 /* get the slot number from the message */ 1042 /* get the slot number from the message */
1042 pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8; 1043 pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8;