summaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorSasha Levin <sashal@kernel.org>2021-02-12 19:29:24 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2021-02-16 06:01:45 +0300
commit88a686728b3739d3598851e729c0e81f194e5c53 (patch)
tree4de7baef4769c087f14d7aef4f0b4803cd290706 /include/linux/usb
parent9b82f13e7ef316cdc0a8858f1349f4defce3f9e0 (diff)
downloadlinux-88a686728b3739d3598851e729c0e81f194e5c53.tar.xz
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 'include/linux/usb')
-rw-r--r--include/linux/usb/composite.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index a2d229ab63ba..7531ce723374 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -573,8 +573,8 @@ static inline u16 get_default_bcdDevice(void)
{
u16 bcdDevice;
- bcdDevice = bin2bcd((LINUX_VERSION_CODE >> 16 & 0xff)) << 8;
- bcdDevice |= bin2bcd((LINUX_VERSION_CODE >> 8 & 0xff));
+ bcdDevice = bin2bcd(LINUX_VERSION_MAJOR) << 8;
+ bcdDevice |= bin2bcd(LINUX_VERSION_PATCHLEVEL);
return bcdDevice;
}