aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@suse.cz>2014-02-07 19:15:11 +0100
committerBen Hutchings <ben@decadent.org.uk>2014-04-02 00:58:50 +0100
commit1199a29a07b529adedb1623dd2a6e17c33c763f2 (patch)
tree9b739ab79fdf84b88f3e3674aca55b6dd711eea5 /scripts
parent93fb7adb880cf960485cfe4c599904e959890be9 (diff)
downloadkernel_samsung_smdk4412-1199a29a07b529adedb1623dd2a6e17c33c763f2.zip
kernel_samsung_smdk4412-1199a29a07b529adedb1623dd2a6e17c33c763f2.tar.gz
kernel_samsung_smdk4412-1199a29a07b529adedb1623dd2a6e17c33c763f2.tar.bz2
Modpost: fixed USB alias generation for ranges including 0x9 and 0xA
commit 03b56329f9bb5a1cb73d7dc659d529a9a9bf3acc upstream. Commit afe2dab4f6 ("USB: add hex/bcd detection to usb modalias generation") changed the routine that generates alias ranges. Before that change, only digits 0-9 were supported; the commit tried to fix the case when the range includes higher values than 0x9. Unfortunately, the commit didn't fix the case when the range includes both 0x9 and 0xA, meaning that the final range must look like [x-9A-y] where x <= 0x9 and y >= 0xA -- instead the [x-9A-x] range was produced. Modprobe doesn't complain as it sees no difference between no-match and bad-pattern results of fnmatch(). Fixing this simple bug to fix the aliases. Also changing the hardcoded beginning of the range to uppercase as all the other letters are also uppercase in the device version numbers. Fortunately, this affects only the dvb-usb-dib0700 module, AFAIK. Signed-off-by: Jan Moskyto Matejka <mq@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/file2alias.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index d1d0ae8..98ff331 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -130,8 +130,8 @@ static void do_usb_entry(struct usb_device_id *id,
range_lo < 0x9 ? "[%X-9" : "[%X",
range_lo);
sprintf(alias + strlen(alias),
- range_hi > 0xA ? "a-%X]" : "%X]",
- range_lo);
+ range_hi > 0xA ? "A-%X]" : "%X]",
+ range_hi);
}
}
if (bcdDevice_initial_digits < (sizeof(id->bcdDevice_lo) * 2 - 1))