From 5948ae27fb4f0e87ce8543ca1934599b83929a3e Mon Sep 17 00:00:00 2001 From: Jens Taprogge Date: Fri, 7 Sep 2012 10:29:19 +0200 Subject: staging/ipack: Fix bug introduced by IPack device matching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ~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 Signed-off-by: Jens Taprogge Acked-by: Samuel Iglesias Gonsálvez Signed-off-by: Greg Kroah-Hartman --- scripts/mod/file2alias.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 3c22bda8fdf3..df4fc23dd836 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -973,7 +973,7 @@ static int do_ipack_entry(const char *filename, id->vendor = TO_NATIVE(id->vendor); id->device = TO_NATIVE(id->device); strcpy(alias, "ipack:"); - ADD(alias, "f", id->format != IPACK_ANY_ID, id->format); + ADD(alias, "f", id->format != IPACK_ANY_FORMAT, id->format); ADD(alias, "v", id->vendor != IPACK_ANY_ID, id->vendor); ADD(alias, "d", id->device != IPACK_ANY_ID, id->device); add_wildcard(alias); -- cgit v1.2.2