HID: uclogic: Avoid linking common code into multiple modules
authorJosé Expósito <jose.exposito89@gmail.com>
Fri, 14 Jun 2024 16:16:05 +0000 (18:16 +0200)
committerJiri Kosina <jkosina@suse.com>
Wed, 19 Jun 2024 14:33:10 +0000 (16:33 +0200)
commitf4ceb2a044f653344ea52c79d775fb876dfb1d1c
treed835f6378075ad88b180aadd1e49b143573983a0
parenta3a5a37efba11b7cf1a86abe7bccfbcdb521764e
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>
drivers/hid/Makefile
drivers/hid/hid-uclogic-rdesc-test.c
drivers/hid/hid-uclogic-rdesc.c