diff options
author | Vinod Koul <vinod.koul@intel.com> | 2011-07-25 09:52:01 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-07-26 06:03:29 -0400 |
commit | f32807f1ff7fbfd2d4ec708b1ac8cb75cb92bfef (patch) | |
tree | 543d0cacbc1a3e1b146037e5f17d62116f19ac0c /drivers/dma | |
parent | 760596c6b986e6345a28392cf40ee344bfd209a6 (diff) |
dmaengine: pl08x: handle the rest of enums in pl08x_width
pl08x_width function does not handle rest of enums for DMA_SLAVE_BUSWIDTH_xxxx
which causes gcc to emit below warining
drivers/dma/amba-pl08x.c: In function 'pl08x_width':
drivers/dma/amba-pl08x.c:1119: warning: enumeration value
'DMA_SLAVE_BUSWIDTH_UNDEFINED' not handled in switch
drivers/dma/amba-pl08x.c:1119: warning: enumeration value
'DMA_SLAVE_BUSWIDTH_8_BYTES' not handled in switch
this patch adds a default case which returns error
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/amba-pl08x.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 9aa2bd4452d3..196a7378d332 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
@@ -1123,8 +1123,9 @@ static u32 pl08x_width(enum dma_slave_buswidth width) | |||
1123 | return PL080_WIDTH_16BIT; | 1123 | return PL080_WIDTH_16BIT; |
1124 | case DMA_SLAVE_BUSWIDTH_4_BYTES: | 1124 | case DMA_SLAVE_BUSWIDTH_4_BYTES: |
1125 | return PL080_WIDTH_32BIT; | 1125 | return PL080_WIDTH_32BIT; |
1126 | default: | ||
1127 | return ~0; | ||
1126 | } | 1128 | } |
1127 | return ~0; | ||
1128 | } | 1129 | } |
1129 | 1130 | ||
1130 | static u32 pl08x_burst(u32 maxburst) | 1131 | static u32 pl08x_burst(u32 maxburst) |