diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-01-21 00:56:03 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-27 09:39:42 -0600 |
commit | 100832abf065bc186ae48165c16546784b90a4be (patch) | |
tree | 2c61406ba75310395682841280323d2b0256dee0 /drivers/usb/isp1760/isp1760-hcd.h | |
parent | 7ef077a8ad3557f030d0407c4f56c5a0cf1e418a (diff) | |
download | blackbird-op-linux-100832abf065bc186ae48165c16546784b90a4be.tar.gz blackbird-op-linux-100832abf065bc186ae48165c16546784b90a4be.zip |
usb: isp1760: Make HCD support optional
Enable compilation of the isp1760 driver in pure host mode, pure device
mode, or dual-role mode.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/isp1760/isp1760-hcd.h')
-rw-r--r-- | drivers/usb/isp1760/isp1760-hcd.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/usb/isp1760/isp1760-hcd.h b/drivers/usb/isp1760/isp1760-hcd.h index df7ea3684b77..0c1c98d6ea08 100644 --- a/drivers/usb/isp1760/isp1760-hcd.h +++ b/drivers/usb/isp1760/isp1760-hcd.h @@ -47,6 +47,7 @@ enum isp1760_queue_head_types { }; struct isp1760_hcd { +#ifdef CONFIG_USB_ISP1760_HCD struct usb_hcd *hcd; u32 hcs_params; @@ -64,8 +65,10 @@ struct isp1760_hcd { unsigned i_thresh; unsigned long reset_done; unsigned long next_statechange; +#endif }; +#ifdef CONFIG_USB_ISP1760_HCD int isp1760_hcd_register(struct isp1760_hcd *priv, void __iomem *regs, struct resource *mem, int irq, unsigned long irqflags, struct device *dev); @@ -73,5 +76,27 @@ void isp1760_hcd_unregister(struct isp1760_hcd *priv); int isp1760_init_kmem_once(void); void isp1760_deinit_kmem_cache(void); +#else +static inline int isp1760_hcd_register(struct isp1760_hcd *priv, + void __iomem *regs, struct resource *mem, + int irq, unsigned long irqflags, + struct device *dev) +{ + return 0; +} + +static inline void isp1760_hcd_unregister(struct isp1760_hcd *priv) +{ +} + +static inline int isp1760_init_kmem_once(void) +{ + return 0; +} + +static inline void isp1760_deinit_kmem_cache(void) +{ +} +#endif #endif /* _ISP1760_HCD_H_ */ |