ASoC: Tegra: Fix compiler warnings
Sumit Bhattacharya [Thu, 8 Dec 2011 10:56:59 +0000 (15:56 +0530)]
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>

Rebase-Id: Rb4a83dd9f06607009ba58b0e733aa3531eebccc9

sound/soc/tegra/tegra30_ahub.h
sound/soc/tegra/tegra30_dam.c
sound/soc/tegra/tegra30_dam.h
sound/soc/tegra/tegra30_i2s.c
sound/soc/tegra/tegra_max98088.c

index 0d18f9c..7de1b7c 100644 (file)
@@ -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 {
index fe11f2b..fa3d5de 100644 (file)
@@ -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;
index ea76a23..371e813 100644 (file)
@@ -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);
index a789dbb..235a49b 100644 (file)
@@ -829,7 +829,7 @@ err_clk_put:
        clk_put(i2s->clk_i2s);
 err_free:
        kfree(i2s);
-exit:
+
        return ret;
 }
 
index 6e23b28..ec6a73c 100644 (file)
@@ -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