Skip to content

Commit 7fa4cd1

Browse files
Fabio EstevamFelipe Balbi
authored andcommitted
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>
1 parent 3416905 commit 7fa4cd1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎include/linux/usb/ulpi.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,16 @@
181181

182182
/*-------------------------------------------------------------------------*/
183183

184+
#if IS_ENABLED(CONFIG_USB_ULPI)
184185
struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,
185186
unsigned int flags);
187+
#else
188+
static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops,
189+
unsigned int flags)
190+
{
191+
return NULL;
192+
}
193+
#endif
186194

187195
#ifdef CONFIG_USB_ULPI_VIEWPORT
188196
/* access ops for controllers with a viewport register */

0 commit comments

Comments
 (0)