diff options
author | Tony Lindgren <tony@atomide.com> | 2014-11-24 22:05:06 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-25 17:47:07 +0300 |
commit | ebf3992061db1f7b3aa093f37fb308acc74fbc82 (patch) | |
tree | 7eadbb089c31ffe0030a72992d8dedcf8658d95a | |
parent | 82c02f58ba3a1ee0a067c0f90513e826d6152ba6 (diff) | |
download | linux-ebf3992061db1f7b3aa093f37fb308acc74fbc82.tar.xz |
usb: musb: Use IS_ENABLED for tusb6010
This removes the ifdef clutter a bit and saves few lines.
It also makes it easier to detect the remaining places
where we have conditional building of code done based
on if defined for things like DMA.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/musb/musb_core.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.h | 9 | ||||
-rw-r--r-- | drivers/usb/musb/musb_regs.h | 3 |
3 files changed, 4 insertions, 10 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 1388d99b39e0..55fe0ff6fd87 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1527,7 +1527,7 @@ static int musb_core_init(u16 musb_type, struct musb *musb) struct musb_hw_ep *hw_ep = musb->endpoints + i; hw_ep->fifo = musb->io.fifo_offset(i) + mbase; -#if defined(CONFIG_USB_MUSB_TUSB6010) || defined (CONFIG_USB_MUSB_TUSB6010_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_TUSB6010) if (musb->io.quirks & MUSB_IN_TUSB) { hw_ep->fifo_async = musb->async + 0x400 + musb->io.fifo_offset(i); diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index d9248fdd9158..5e65958f7915 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -216,8 +216,7 @@ struct musb_hw_ep { void __iomem *fifo; void __iomem *regs; -#if defined(CONFIG_USB_MUSB_TUSB6010) || \ - defined(CONFIG_USB_MUSB_TUSB6010_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_TUSB6010) void __iomem *conf; #endif @@ -234,8 +233,7 @@ struct musb_hw_ep { struct dma_channel *tx_channel; struct dma_channel *rx_channel; -#if defined(CONFIG_USB_MUSB_TUSB6010) || \ - defined(CONFIG_USB_MUSB_TUSB6010_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_TUSB6010) /* TUSB has "asynchronous" and "synchronous" dma modes */ dma_addr_t fifo_async; dma_addr_t fifo_sync; @@ -339,8 +337,7 @@ struct musb { void __iomem *ctrl_base; void __iomem *mregs; -#if defined(CONFIG_USB_MUSB_TUSB6010) || \ - defined(CONFIG_USB_MUSB_TUSB6010_MODULE) +#if IS_ENABLED(CONFIG_USB_MUSB_TUSB6010) dma_addr_t async; dma_addr_t sync; void __iomem *sync_va; diff --git a/drivers/usb/musb/musb_regs.h b/drivers/usb/musb/musb_regs.h index 92b4c3df9ffa..11f0be07491e 100644 --- a/drivers/usb/musb/musb_regs.h +++ b/drivers/usb/musb/musb_regs.h @@ -287,10 +287,7 @@ #define MUSB_FIFOSIZE 0x0F #define MUSB_CONFIGDATA MUSB_FIFOSIZE /* Re-used for EP0 */ -#if defined(CONFIG_USB_MUSB_TUSB6010) || \ - defined(CONFIG_USB_MUSB_TUSB6010_MODULE) #include "tusb6010.h" /* Needed "only" for TUSB_EP0_CONF */ -#endif #define MUSB_TXCSR_MODE 0x2000 |