aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hcd.c
diff options
context:
space:
mode:
authorSasha Levin <sashal@kernel.org>2021-02-12 11:29:24 -0500
committerMasahiro Yamada <masahiroy@kernel.org>2021-02-16 12:01:45 +0900
commit88a686728b3739d3598851e729c0e81f194e5c53 (patch)
tree4de7baef4769c087f14d7aef4f0b4803cd290706 /drivers/usb/core/hcd.c
parentkbuild: clamp SUBLEVEL to 255 (diff)
downloadlinux-dev-88a686728b3739d3598851e729c0e81f194e5c53.tar.xz
linux-dev-88a686728b3739d3598851e729c0e81f194e5c53.zip
kbuild: simplify access to the kernel's version
Instead of storing the version in a single integer and having various kernel (and userspace) code how it's constructed, export individual (major, patchlevel, sublevel) components and simplify kernel code that uses it. This should also make it easier on userspace. Signed-off-by: Sasha Levin <sashal@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/usb/core/hcd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index ad5a0f405a75..3f0381344221 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -111,8 +111,8 @@ DECLARE_WAIT_QUEUE_HEAD(usb_kill_urb_queue);
*/
/*-------------------------------------------------------------------------*/
-#define KERNEL_REL bin2bcd(((LINUX_VERSION_CODE >> 16) & 0x0ff))
-#define KERNEL_VER bin2bcd(((LINUX_VERSION_CODE >> 8) & 0x0ff))
+#define KERNEL_REL bin2bcd(LINUX_VERSION_MAJOR)
+#define KERNEL_VER bin2bcd(LINUX_VERSION_PATCHLEVEL)
/* usb 3.1 root hub device descriptor */
static const u8 usb31_rh_dev_descriptor[18] = {