HTTPS clone URL
Subversion checkout URL
Please sign in to comment.
usb/core: use bin2bcd() for bcdDevice in RH
The kernel's version number is used as decimal in the bcdDevice field of the RH descriptor. For kernel version v3.12 we would see 3.0c in lsusb. I am not sure how important it is to stick with bcd values since this is this way since we started git history and nobody complained (however back then we reported only 2.6). Signed-off-by: Sebastian Andrzej Siewior <email@example.com> Signed-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>
- Loading branch information...
Showing with 22 additions and 9 deletions.
|@@ -1,14 +1,14 @@|
|-unsigned bcd2bin(unsigned char val)|
|+unsigned _bcd2bin(unsigned char val)|
|return (val & 0x0f) + (val >> 4) * 10;|
|-unsigned char bin2bcd(unsigned val)|
|+unsigned char _bin2bcd(unsigned val)|
|return ((val / 10) << 4) + val % 10;|