diff options
author | Sumit Bhattacharya <sumitb@nvidia.com> | 2011-12-08 16:26:59 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-15 12:06:37 +0530 |
commit | 7e9df77309747d934ebf53891a08eda4238606ae (patch) | |
tree | 61454a89329e83c5ba51cec298d8773ccc668692 /sound | |
parent | 5ae89ec9080a8114e795f698226e0100b11a09cf (diff) |
ASoC: Tegra: Fix compiler warnings
Bug 912637
Change-Id: I05e2d3dcb903bf9d011f9b108a8f65f25ee1d3b5
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/68956
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/tegra/tegra30_ahub.h | 2 | ||||
-rw-r--r-- | sound/soc/tegra/tegra30_dam.c | 12 | ||||
-rw-r--r-- | sound/soc/tegra/tegra30_dam.h | 2 | ||||
-rw-r--r-- | sound/soc/tegra/tegra30_i2s.c | 2 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_max98088.c | 19 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_wm8753.c | 3 |
6 files changed, 19 insertions, 21 deletions
diff --git a/sound/soc/tegra/tegra30_ahub.h b/sound/soc/tegra/tegra30_ahub.h index 0d18f9c94bcc..7de1b7c86c7f 100644 --- a/sound/soc/tegra/tegra30_ahub.h +++ b/sound/soc/tegra/tegra30_ahub.h @@ -490,7 +490,7 @@ extern int tegra30_ahub_set_rx_cif_source(enum tegra30_ahub_rxcif rxcif, extern int tegra30_ahub_unset_rx_cif_source(enum tegra30_ahub_rxcif rxcif); #ifdef CONFIG_PM -extern int tegra30_ahub_apbif_resume(); +extern int tegra30_ahub_apbif_resume(void); #endif struct tegra30_ahub { diff --git a/sound/soc/tegra/tegra30_dam.c b/sound/soc/tegra/tegra30_dam.c index fe11f2b5702e..fa3d5de4e42d 100644 --- a/sound/soc/tegra/tegra30_dam.c +++ b/sound/soc/tegra/tegra30_dam.c @@ -113,7 +113,7 @@ void tegra30_dam_disable_clock(int ifc) struct tegra30_dam_context *dam; if (ifc >= TEGRA30_NR_DAM_IFC) - return -EINVAL; + return; dam = dams_cont_info[ifc]; clk_disable(dam->dam_clk); @@ -227,7 +227,6 @@ int tegra30_dam_allocate_controller() int tegra30_dam_allocate_channel(int ifc, int chid) { - int i = 0; struct tegra30_dam_context *dam = NULL; if (ifc >= TEGRA30_NR_DAM_IFC) @@ -245,7 +244,6 @@ int tegra30_dam_allocate_channel(int ifc, int chid) int tegra30_dam_free_channel(int ifc, int chid) { - int i = 0; struct tegra30_dam_context *dam = NULL; if (ifc >= TEGRA30_NR_DAM_IFC) @@ -284,7 +282,7 @@ void tegra30_dam_set_samplerate(int ifc, int chid, int samplerate) struct tegra30_dam_context *dam = dams_cont_info[ifc]; if (ifc >= TEGRA30_NR_DAM_IFC) - return -EINVAL; + return; switch (chid) { case dam_ch_in0: @@ -294,7 +292,7 @@ void tegra30_dam_set_samplerate(int ifc, int chid, int samplerate) break; case dam_ch_in1: if (samplerate != dam->outsamplerate) - return -EINVAL; + return; dam->ch_insamplerate[dam_ch_in1] = samplerate; break; case dam_ch_out: @@ -445,6 +443,8 @@ int tegra30_dam_set_acif(int ifc, int chid, unsigned int audio_channels, value |= TEGRA30_CIF_DIRECTION_RX; reg = TEGRA30_DAM_AUDIOCIF_CH1_CTRL; break; + default: + return -EINVAL; } tegra30_dam_writel(dams_cont_info[ifc], value, reg); @@ -458,7 +458,7 @@ void tegra30_dam_enable(int ifc, int on, int chid) struct tegra30_dam_context *dam = dams_cont_info[ifc]; if (ifc >= TEGRA30_NR_DAM_IFC) - return -EINVAL; + return; if (chid == dam_ch_in0) enreg = TEGRA30_DAM_CH0_CTRL; diff --git a/sound/soc/tegra/tegra30_dam.h b/sound/soc/tegra/tegra30_dam.h index ea76a2315655..371e8139eec7 100644 --- a/sound/soc/tegra/tegra30_dam.h +++ b/sound/soc/tegra/tegra30_dam.h @@ -149,7 +149,7 @@ int tegra30_dam_resume(int ifc); #endif void tegra30_dam_disable_clock(int ifc); int tegra30_dam_enable_clock(int ifc); -int tegra30_dam_allocate_controller(); +int tegra30_dam_allocate_controller(void); int tegra30_dam_allocate_channel(int ifc, int chid); int tegra30_dam_free_channel(int ifc, int chid); int tegra30_dam_free_controller(int ifc); diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index a789dbba3c48..235a49b4b987 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c @@ -829,7 +829,7 @@ err_clk_put: clk_put(i2s->clk_i2s); err_free: kfree(i2s); -exit: + return ret; } diff --git a/sound/soc/tegra/tegra_max98088.c b/sound/soc/tegra/tegra_max98088.c index 6e23b281cd08..ec6a73c0e084 100644 --- a/sound/soc/tegra/tegra_max98088.c +++ b/sound/soc/tegra/tegra_max98088.c @@ -387,7 +387,7 @@ static int tegra_bt_hw_params(struct snd_pcm_substream *substream, return 0; } -static void tegra_hw_free(struct snd_pcm_substream *substream) +static int tegra_hw_free(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct tegra_max98088 *machine = snd_soc_card_get_drvdata(rtd->card); @@ -436,7 +436,7 @@ static int tegra_max98088_startup(struct snd_pcm_substream *substream) return 0; } -static int tegra_max98088_shutdown(struct snd_pcm_substream *substream) +static void tegra_max98088_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; @@ -444,7 +444,7 @@ static int tegra_max98088_shutdown(struct snd_pcm_substream *substream) if ((substream->stream != SNDRV_PCM_STREAM_PLAYBACK) || !(i2s->is_dam_used)) - return 0; + return; /* disable the dam*/ tegra30_dam_enable(i2s->dam_ifc, TEGRA30_DAM_DISABLE, @@ -461,7 +461,7 @@ static int tegra_max98088_shutdown(struct snd_pcm_substream *substream) if (!i2s->dam_ch_refcount) tegra30_dam_free_controller(i2s->dam_ifc); - return 0; + return; } #endif @@ -545,7 +545,7 @@ static int tegra_voice_call_hw_params(struct snd_pcm_substream *substream, return 0; } -static int tegra_voice_call_shutdown(struct snd_pcm_substream *substream) +static void tegra_voice_call_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct tegra_max98088 *machine = @@ -556,7 +556,7 @@ static int tegra_voice_call_shutdown(struct snd_pcm_substream *substream) machine->codec_info[HIFI_CODEC].channels = 0; #endif - return 0; + return; } static int tegra_bt_voice_call_hw_params(struct snd_pcm_substream *substream, @@ -619,7 +619,7 @@ static int tegra_bt_voice_call_hw_params(struct snd_pcm_substream *substream, return 0; } -static int tegra_bt_voice_call_shutdown(struct snd_pcm_substream *substream) +static void tegra_bt_voice_call_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct tegra_max98088 *machine = @@ -630,7 +630,7 @@ static int tegra_bt_voice_call_shutdown(struct snd_pcm_substream *substream) machine->codec_info[BT_SCO].channels = 0; #endif - return 0; + return; } static struct snd_soc_ops tegra_max98088_ops = { @@ -1003,8 +1003,7 @@ static __devinit int tegra_max98088_driver_probe(struct platform_device *pdev) /* Add h2w switch class support */ ret = switch_dev_register(&wired_switch_dev); if (ret < 0) { - dev_err(&pdev->dev, "not able to register switch device\n", - ret); + dev_err(&pdev->dev, "not able to register switch device\n"); goto err_fini_utils; } #endif diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c index 15c6c6e0aa48..d57d92963bc5 100644 --- a/sound/soc/tegra/tegra_wm8753.c +++ b/sound/soc/tegra/tegra_wm8753.c @@ -619,8 +619,7 @@ static __devinit int tegra_wm8753_driver_probe(struct platform_device *pdev) /* Add h2w swith class support */ ret = switch_dev_register(&wired_switch_dev); if (ret < 0) { - dev_err(&pdev->dev, "not able to register switch device %d\n", - ret); + dev_err(&pdev->dev, "not able to register switch device\n"); goto err_unregister_card; } #endif |