提交 e2df64c1 编写于 作者: P Pavel Roskin 提交者: John W. Linville

ath5k: use kstrtoint() to parse numbers coming from sysfs

Signed-off-by: NPavel Roskin <proski@gnu.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 e4bbf2f5
......@@ -19,9 +19,11 @@ static ssize_t ath5k_attr_store_##name(struct device *dev, \
const char *buf, size_t count) \
{ \
struct ath5k_softc *sc = dev_get_drvdata(dev); \
int val; \
int val, ret; \
\
val = (int)simple_strtoul(buf, NULL, 10); \
ret = kstrtoint(buf, 10, &val); \
if (ret < 0) \
return ret; \
set(sc->ah, val); \
return count; \
} \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册