aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/hid/hid-uclogic-rdesc.c
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2024-06-14 18:16:05 +0200
committerJiri Kosina <jkosina@suse.com>2024-06-19 16:33:10 +0200
commitf4ceb2a044f653344ea52c79d775fb876dfb1d1c (patch)
treed835f6378075ad88b180aadd1e49b143573983a0 /drivers/hid/hid-uclogic-rdesc.c
parentHID: Ignore battery for ELAN touchscreens 2F2C and 4116 (diff)
downloadwireguard-linux-f4ceb2a044f653344ea52c79d775fb876dfb1d1c.tar.xz
wireguard-linux-f4ceb2a044f653344ea52c79d775fb876dfb1d1c.zip
HID: uclogic: Avoid linking common code into multiple modules
The hid-uclogic-params.o and hid-uclogic-rdesc.o files are linked into both the driver module and the unit test, which triggers a W=1 warning: scripts/Makefile.build:236: drivers/hid/Makefile: hid-uclogic-rdesc.o is added to multiple modules: hid-uclogic hid-uclogic-test scripts/Makefile.build:236: drivers/hid/Makefile: hid-uclogic-params.o is added to multiple modules: hid-uclogic hid-uclogic-test Avoids this by moving these two files into a separate module that is used by the driver and the unit test. Reported-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/hid/hid-uclogic-rdesc.c')
-rw-r--r--drivers/hid/hid-uclogic-rdesc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdesc.c
index b6dfdf6356a6..6c7a90417569 100644
--- a/drivers/hid/hid-uclogic-rdesc.c
+++ b/drivers/hid/hid-uclogic-rdesc.c
@@ -17,6 +17,7 @@
#include "hid-uclogic-rdesc.h"
#include <linux/slab.h>
#include <asm/unaligned.h>
+#include <kunit/visibility.h>
/* Fixed WP4030U report descriptor */
__u8 uclogic_rdesc_wp4030u_fixed_arr[] = {
@@ -1242,3 +1243,4 @@ __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr,
return rdesc_ptr;
}
+EXPORT_SYMBOL_IF_KUNIT(uclogic_rdesc_template_apply);