summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJens Taprogge <jens.taprogge@taprogge.org>2012-09-07 12:29:19 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-07 19:27:34 +0400
commit5948ae27fb4f0e87ce8543ca1934599b83929a3e (patch)
treed7d8e33ddc830a1b969f87d9064550024b1dd957 /include/linux
parent7953e44cefe1359032d1148de69b966bcd2e5233 (diff)
downloadlinux-5948ae27fb4f0e87ce8543ca1934599b83929a3e.tar.xz
staging/ipack: Fix bug introduced by IPack device matching
~0 can not be casted to u8. Instead of using the IPACK_ANY_ID for the format field we introduce a new IPACK_ANY_FORMAT specifically for that field and defined as 0xff. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mod_devicetable.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 999c4c25fbf7..70c6a359b2f4 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -600,6 +600,7 @@ struct x86_cpu_id {
#define X86_MODEL_ANY 0
#define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */
+#define IPACK_ANY_FORMAT 0xff
#define IPACK_ANY_ID (~0)
struct ipack_device_id {
__u8 format; /* Format version or IPACK_ANY_ID */