linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] Fix input modalias sysfs attribute return size
@ 2006-06-21 23:00 Richard Purdie
  2006-06-26 13:28 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2006-06-21 23:00 UTC (permalink / raw)
  To: LKML, Dmitry Torokhov; +Cc: linux-input, Greg KH

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] Fix input modalias sysfs attribute return size
  2006-06-21 23:00 [patch] Fix input modalias sysfs attribute return size Richard Purdie
@ 2006-06-26 13:28 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2006-06-26 13:28 UTC (permalink / raw)
  To: Richard Purdie; +Cc: LKML, linux-input, Greg KH

On 6/21/06, Richard Purdie <rpurdie@rpsys.net> wrote:
> 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.
>

Applied to my tree, Linus should pull shortly. Thank you Richard.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-26 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-21 23:00 [patch] Fix input modalias sysfs attribute return size Richard Purdie
2006-06-26 13:28 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).