mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
aeffd2c3b0
It is since ages perfectly possible to compile both of these modules into the same kernel, which makes no sense since it is one piece of hardware. Compile one module named "fotg210.ko" for both HCD and UDC drivers by collecting the init calls into a fotg210-core.c file and start to centralize things handling one and the same piece of hardware. Stub out the initcalls if one or the other part of the driver was not selected. Tested by compiling one or the other or both of the drivers into the kernel and as modules. Cc: Fabian Vogt <fabian@ritter-vogt.de> Cc: Yuan-Hsin Chen <yhchen@faraday-tech.com> Cc: Felipe Balbi <balbi@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20221023144708.3596563-2-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 lines
423 B
Makefile
11 lines
423 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# This setup links the different object files into one single
|
|
# module so we don't have to EXPORT() a lot of internal symbols
|
|
# or create unnecessary submodules.
|
|
fotg210-objs-y += fotg210-core.o
|
|
fotg210-objs-$(CONFIG_USB_FOTG210_HCD) += fotg210-hcd.o
|
|
fotg210-objs-$(CONFIG_USB_FOTG210_UDC) += fotg210-udc.o
|
|
fotg210-objs := $(fotg210-objs-y)
|
|
obj-$(CONFIG_USB_FOTG210) += fotg210.o
|