lkml.org 
[lkml]   [2006]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch] Fix input modalias sysfs attribute return size
From
Date
When writing some udev rules using the input system's modalias
attribute, udevinfo showed it as being ignored. Debugging revealed the
52 character string was over 128 bytes long according to udev (and hence
ignored).

The problem appears to be in the kernel where a max_t in input.c should
really be a min_t.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>

Index: linux-2.6.17/drivers/input/input.c
===================================================================
--- linux-2.6.17.orig/drivers/input/input.c 2006-06-21 23:47:11.000000000 +0100
+++ linux-2.6.17/drivers/input/input.c 2006-06-21 23:47:48.000000000 +0100
@@ -629,7 +629,7 @@

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



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-22 01:03    [W:0.032 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site