diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-09-07 16:31:45 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-10 22:13:16 +0400 |
commit | b53d657d84f530e5d83f34ff1b81ceedad3faa31 (patch) | |
tree | f7921ce311aca66d7f42031e3a6e0cd31a808ea9 /drivers/usb/core | |
parent | 8a424bf40d772fedacc91862ecc86f10541fabb3 (diff) | |
download | linux-b53d657d84f530e5d83f34ff1b81ceedad3faa31.tar.xz |
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 <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index bc84106ac057..6e4fd28bc242 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -22,6 +22,7 @@ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <linux/bcd.h> #include <linux/module.h> #include <linux/version.h> #include <linux/kernel.h> @@ -123,9 +124,8 @@ static inline int is_root_hub(struct usb_device *udev) */ /*-------------------------------------------------------------------------*/ - -#define KERNEL_REL ((LINUX_VERSION_CODE >> 16) & 0x0ff) -#define KERNEL_VER ((LINUX_VERSION_CODE >> 8) & 0x0ff) +#define KERNEL_REL bin2bcd(((LINUX_VERSION_CODE >> 16) & 0x0ff)) +#define KERNEL_VER bin2bcd(((LINUX_VERSION_CODE >> 8) & 0x0ff)) /* usb 3.0 root hub device descriptor */ static const u8 usb3_rh_dev_descriptor[18] = { |