[PATCH 24/25] Input: return correct size when reading modalias attribute

Chris Wright
2006-06-27T20:21:11Z

[-- Attachment #1: input-return-correct-size-when-reading-modalias-attribute.patch --]
[-- Type: text/plain, Size: 785 bytes --]

-stable review patch. If anyone has any objections, please let us know.
------------------

From: Richard Purdie <rpurdie@rpsys.net>

return correct size when reading modalias attribute

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---

drivers/input/input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.17.1.orig/drivers/input/input.c
+++ linux-2.6.17.1/drivers/input/input.c
@@ -629,7 +629,7 @@ static ssize_t input_dev_show_modalias(s

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);

--