USB: handle bcd incrementation in usb modalias generation
authorNathaniel McCallum <nathaniel@natemccallum.com>
Thu, 19 Nov 2009 01:15:28 +0000 (20:15 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 19:55:20 +0000 (11:55 -0800)
commit55f49f26821f379c451deb9fd6de8e59afb9b37e
treec4c4cfd20a6766cd38ec25213124ccc92b48592e
parentafe2dab4f6d32d5650aaba42f2c7ec9c0622f4dd
USB: handle bcd incrementation in usb modalias generation

This patch fixes a bug when incrementing/decrementing on a BCD formatted
integer (i.e. 0x09++ should be 0x10 not 0x0A).  It just adds a function
for incrementing/decrementing BCD integers by converting to decimal,
doing the increment/decrement and then converting back to BCD.

Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
scripts/mod/file2alias.c