diff options
Diffstat (limited to 'drivers/s390/net/lcs.c')
-rw-r--r-- | drivers/s390/net/lcs.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 0a7d87c372b8..92190aa20b9f 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -1943,15 +1943,16 @@ static ssize_t | |||
1943 | lcs_portno_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 1943 | lcs_portno_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1944 | { | 1944 | { |
1945 | struct lcs_card *card; | 1945 | struct lcs_card *card; |
1946 | int value, rc; | 1946 | int rc; |
1947 | s16 value; | ||
1947 | 1948 | ||
1948 | card = dev_get_drvdata(dev); | 1949 | card = dev_get_drvdata(dev); |
1949 | 1950 | ||
1950 | if (!card) | 1951 | if (!card) |
1951 | return 0; | 1952 | return 0; |
1952 | 1953 | ||
1953 | rc = sscanf(buf, "%d", &value); | 1954 | rc = kstrtos16(buf, 0, &value); |
1954 | if (rc != 1) | 1955 | if (rc) |
1955 | return -EINVAL; | 1956 | return -EINVAL; |
1956 | /* TODO: sanity checks */ | 1957 | /* TODO: sanity checks */ |
1957 | card->portno = value; | 1958 | card->portno = value; |
@@ -2007,8 +2008,8 @@ lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char | |||
2007 | if (!card) | 2008 | if (!card) |
2008 | return 0; | 2009 | return 0; |
2009 | 2010 | ||
2010 | rc = sscanf(buf, "%u", &value); | 2011 | rc = kstrtouint(buf, 0, &value); |
2011 | if (rc != 1) | 2012 | if (rc) |
2012 | return -EINVAL; | 2013 | return -EINVAL; |
2013 | /* TODO: sanity checks */ | 2014 | /* TODO: sanity checks */ |
2014 | card->lancmd_timeout = value; | 2015 | card->lancmd_timeout = value; |