6 Jan
2014
6 Jan
'14
6:20 p.m.
On Fri, Jan 03, 2014 at 02:05:02PM +0800, RongJun Ying wrote:
+static void sirf_usp_tx_fifo_op(struct sirf_usp *susp, int cmd) +{
- switch (cmd) {
- case FIFO_RESET:
writel(USP_TX_FIFO_RESET, susp->base + USP_TX_FIFO_OP);
writel(0, susp->base + USP_TX_FIFO_OP);
break;
- case FIFO_START:
writel(USP_TX_FIFO_START, susp->base + USP_TX_FIFO_OP);
break;
- case FIFO_STOP:
writel(0, susp->base + USP_TX_FIFO_OP);
break;
- }
+}
I'm not sure these functions and the switch statements in them are adding anything - none of the statements share any code. Either refactor this so that the callers pass in USP_TX_FIFO_blah for the argument or just inline the register operations.
+static inline void sirf_usp_tx_enable(struct sirf_usp *susp) +{
- writel(readl(susp->base + USP_TX_RX_ENABLE) | USP_TX_ENA,
susp->base + USP_TX_RX_ENABLE);
+}
Similar thing here, just inline.
+static int sirf_usp_pcm_dai_probe(struct snd_soc_dai *dai) +{
- dai->playback_dma_data = &dma_data[0];
- dai->capture_dma_data = &dma_data[1];
snd_soc_dai_init_dma_data().