mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 02:46:06 +00:00
usb: cdc-wdm: fix build error when CONFIG_WWAN_CORE is not set
Gcc report build error as following when CONFIG_WWAN_CORE is not set: x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_disconnect': cdc-wdm.c:(.text+0xb2a): undefined reference to `wwan_remove_port' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_in_callback': cdc-wdm.c:(.text+0xf23): undefined reference to `wwan_port_rx' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_stop': cdc-wdm.c:(.text+0x127d): undefined reference to `wwan_port_get_drvdata' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_tx': cdc-wdm.c:(.text+0x12d9): undefined reference to `wwan_port_get_drvdata' x86_64-linux-gnu-ld: cdc-wdm.c:(.text+0x13c1): undefined reference to `wwan_port_txoff' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_start': cdc-wdm.c:(.text+0x13e0): undefined reference to `wwan_port_get_drvdata' x86_64-linux-gnu-ld: cdc-wdm.c:(.text+0x1431): undefined reference to `wwan_port_txon' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_tx_complete': cdc-wdm.c:(.text+0x14a4): undefined reference to `wwan_port_txon' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_create.cold': cdc-wdm.c:(.text.unlikely+0x209): undefined reference to `wwan_create_port' Using CONFIG_WWAN_CORE instead of CONFIG_WWAN to avoid build error. Fixes: cac6fb015f71 ("usb: class: cdc-wdm: WWAN framework integration") Reported-by: Hulk Robot <hulkci@huawei.com> Reviewed-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20210521021010.2490930-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1f958f3dff
commit
5c912e6795
@ -824,7 +824,7 @@ static struct usb_class_driver wdm_class = {
|
||||
};
|
||||
|
||||
/* --- WWAN framework integration --- */
|
||||
#ifdef CONFIG_WWAN
|
||||
#ifdef CONFIG_WWAN_CORE
|
||||
static int wdm_wwan_port_start(struct wwan_port *port)
|
||||
{
|
||||
struct wdm_device *desc = wwan_port_get_drvdata(port);
|
||||
@ -963,11 +963,11 @@ static void wdm_wwan_rx(struct wdm_device *desc, int length)
|
||||
/* inbuf has been copied, it is safe to check for outstanding data */
|
||||
schedule_work(&desc->service_outs_intr);
|
||||
}
|
||||
#else /* CONFIG_WWAN */
|
||||
#else /* CONFIG_WWAN_CORE */
|
||||
static void wdm_wwan_init(struct wdm_device *desc) {}
|
||||
static void wdm_wwan_deinit(struct wdm_device *desc) {}
|
||||
static void wdm_wwan_rx(struct wdm_device *desc, int length) {}
|
||||
#endif /* CONFIG_WWAN */
|
||||
#endif /* CONFIG_WWAN_CORE */
|
||||
|
||||
/* --- error handling --- */
|
||||
static void wdm_rxwork(struct work_struct *work)
|
||||
|
Loading…
x
Reference in New Issue
Block a user