usb: usb_phy_gen: refine conditional declaration of usb_nop_xceiv_register
authorGuenter Roeck <linux@roeck-us.net>
Thu, 17 Oct 2013 02:18:41 +0000 (19:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2013 16:34:30 +0000 (09:34 -0700)
commit94468783cd960aa14b22503dd59afd14efb785aa
treea0a04177f9106838912d3bebf0bad98cae09d610
parenteea88512f82ebf1336253ead6c476c9cb54bdf0e
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.

Cc: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/usb/usb_phy_gen_xceiv.h