[patch] Fix input modalias sysfs attribute return size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux