History

usb: usb_phy_gen: refine conditional declaration of usb_nop_xceiv_register

Commit 3fa4d734 (usb: phy: rename nop_usb_xceiv => usb_phy_gen_xceiv) changed the conditional around the declaration of usb_nop_xceiv_register from #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) to #if IS_ENABLED(CONFIG_NOP_USB_XCEIV) While that looks the same, it is semantically different. The first expression is true if CONFIG_NOP_USB_XCEIV is built as module and if the including code is built as module. The second expression is true if code depending on CONFIG_NOP_USB_XCEIV if built as module or into the kernel. As a result, the arm:allmodconfig build fails with arch/arm/mach-omap2/built-in.o: In function `omap3_evm_init': arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to `usb_nop_xceiv_register' Fix the problem by reverting to the old conditional.

Guenter Roeck committed 13 years ago

Commit 94468781 parent eea88511 file · +1 −1Browse files

Unified · Split

include/linux/usb/usb_phy_gen_xceiv.h+1−1
@@ -12,7 +12,7 @@ struct usb_phy_gen_xceiv_platform_data { · 11 unmodified lines
12 unsigned int needs_reset:1;12 unsigned int needs_reset:1;
13};13};
14 14
15#if IS_ENABLED(CONFIG_NOP_USB_XCEIV)15#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
16/* sometimes transceivers are accessed only through e.g. ULPI */16/* sometimes transceivers are accessed only through e.g. ULPI */
17extern void usb_nop_xceiv_register(void);17extern void usb_nop_xceiv_register(void);
18extern void usb_nop_xceiv_unregister(void);18extern void usb_nop_xceiv_unregister(void);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t