6 Jan
2014
6 Jan
'14
6:12 p.m.
On Fri, Jan 03, 2014 at 02:05:01PM +0800, RongJun Ying wrote:
+static int sirf_i2s_dai_probe(struct snd_soc_dai *dai) +{
- dai->playback_dma_data = &dma_data[0];
- dai->capture_dma_data = &dma_data[1];
- return 0;
+}
Call snd_soc_dai_init_dma_data() rather than assigning directly.
- },
- .ops = &sirfsoc_i2s_dai_ops,
+}; +#ifdef CONFIG_PM_RUNTIME
Blank line after the struct please.
writel(si2s->i2s_ctrl, si2s->base + AUDIO_CTRL_I2S_CTRL);
/*Restore MCLK enable and reference clock select bits.*/
/* text */
- si2s->sirf_pcm_pdev = platform_device_register_simple("sirf-pcm-audio",
0, NULL, 0);
- if (IS_ERR(si2s->sirf_pcm_pdev))
return PTR_ERR(si2s->sirf_pcm_pdev);
This should just be a call to register the DMA directly rather than create a device to do it.
- ret = of_address_to_resource(pdev->dev.of_node, 0, &mem_res);
- if (ret < 0) {
dev_err(&pdev->dev, "Unable to get i2s memory resource.\n");
return ret;
- }
It is more normal to use platform_get_resource(), it works fine with OF resources and is more idiomatic than using the OF specific stuff.