提交 8a3cf456 编写于 作者: R Richard Purdie 提交者: Dmitry Torokhov

Input: return correct size when reading modalias attribute

Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 62f7caf9
...@@ -629,7 +629,7 @@ static ssize_t input_dev_show_modalias(struct class_device *dev, char *buf) ...@@ -629,7 +629,7 @@ static ssize_t input_dev_show_modalias(struct class_device *dev, char *buf)
len = input_print_modalias(buf, PAGE_SIZE, id, 1); len = input_print_modalias(buf, PAGE_SIZE, id, 1);
return max_t(int, len, PAGE_SIZE); return min_t(int, len, PAGE_SIZE);
} }
static CLASS_DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL); static CLASS_DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册