diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-03-20 14:35:44 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-20 16:30:40 +0100 |
commit | 7fa4cd1a78ea5af688ffce45553abbee9d7afd84 (patch) | |
tree | 8504ffc3fd9d2e2abd90c39c11edf6667c8d9075 /include | |
parent | usb: gadget: ffs: fix enable multiple instances (diff) | |
download | linux-7fa4cd1a78ea5af688ffce45553abbee9d7afd84.tar.xz linux-7fa4cd1a78ea5af688ffce45553abbee9d7afd84.zip |
usb: ulpi: Define a *otg_ulpi_create no-op
Building a kernel for imx_v4_v5_defconfig with CONFIG_USB_ULPI disabled, results
in the following error:
arch/arm/mach-imx/built-in.o: In function 'pca100_init':
platform-mx2-emma.c:(.init.text+0x6788): undefined reference to 'otg_ulpi_create'
platform-mx2-emma.c:(.init.text+0x682c): undefined reference to 'mxc_ulpi_access_ops'
Fix this by providing a no-op definition of *otg_ulpi_create for the case when
CONFIG_USB_ULPI is not defined.
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb/ulpi.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h index 6f033a415ecb..5c295c26ad37 100644 --- a/include/linux/usb/ulpi.h +++ b/include/linux/usb/ulpi.h @@ -181,8 +181,16 @@ /*-------------------------------------------------------------------------*/ +#if IS_ENABLED(CONFIG_USB_ULPI) struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, unsigned int flags); +#else +static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, + unsigned int flags) +{ + return NULL; +} +#endif #ifdef CONFIG_USB_ULPI_VIEWPORT /* access ops for controllers with a viewport register */ |