From dba7c3da80f2f8eb9e50545276dd2d540b1dcfc1 Mon Sep 17 00:00:00 2001 From: Jonathan Hunter Date: Fri, 8 Feb 2019 15:06:12 +0000 Subject: [PATCH] ASoC: tegra-alt: Remove unused variables Remove unused variables for the various Tegra sound driver files. Note that these variables are not flagged by the compiler because they are initialised but they are not actually used anywhere. Bug 1665446 Change-Id: Id10bb316780813565847492b19025ba369188c09 Signed-off-by: Jonathan Hunter Reviewed-on: https://git-master.nvidia.com/r/2016368 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mohan Kumar D GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- sound/soc/tegra-alt/include/tegra210_admaif_alt.h | 3 +-- sound/soc/tegra-alt/include/tegra_asoc_utils_alt.h | 3 +-- .../machine_drivers/tegra_machine_driver_mobile.c | 8 +------- sound/soc/tegra-alt/tegra210_admaif_alt.c | 1 - sound/soc/tegra-alt/utils/tegra_asoc_utils_alt.c | 4 +--- 5 files changed, 4 insertions(+), 15 deletions(-) diff --git a/sound/soc/tegra-alt/include/tegra210_admaif_alt.h b/sound/soc/tegra-alt/include/tegra210_admaif_alt.h index f989537e..9e32a828 100644 --- a/sound/soc/tegra-alt/include/tegra210_admaif_alt.h +++ b/sound/soc/tegra-alt/include/tegra210_admaif_alt.h @@ -1,7 +1,7 @@ /* * tegra210_admaif_alt.h - Tegra ADMAIF registers * - * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -170,7 +170,6 @@ struct tegra_admaif { /* regmap for admaif */ struct regmap *regmap; struct device *dev; - int refcnt; struct tegra_alt_pcm_dma_params *capture_dma_data; struct tegra_alt_pcm_dma_params *playback_dma_data; const struct tegra_admaif_soc_data *soc_data; diff --git a/sound/soc/tegra-alt/include/tegra_asoc_utils_alt.h b/sound/soc/tegra-alt/include/tegra_asoc_utils_alt.h index 112a6ae3..8fa717dc 100644 --- a/sound/soc/tegra-alt/include/tegra_asoc_utils_alt.h +++ b/sound/soc/tegra-alt/include/tegra_asoc_utils_alt.h @@ -2,7 +2,7 @@ * tegra_alt_asoc_utils.h - Definitions for MCLK and DAP Utility driver * * Author: Stephen Warren - * Copyright (c) 2011-2018 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -54,7 +54,6 @@ struct tegra_asoc_audio_clock_info { struct clk *clk_cdev1; struct clk *clk_ahub; struct reset_control *clk_cdev1_rst; - int clk_cdev1_state; struct clk *clk_m; struct clk *clk_pll_p_out1; int set_mclk; diff --git a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c index 106cee69..15de77d0 100644 --- a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c +++ b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c @@ -1,7 +1,7 @@ /* * tegra_machine_driver_mobile.c - Tegra ASoC Machine driver for mobile * - * Copyright (c) 2017-2018 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -79,7 +79,6 @@ struct tegra_machine_soc_data { bool is_asrc_available, is_clk_rate_via_dt, - write_cdev1_state, write_idle_bias_off_state; /* call back APIs */ @@ -144,7 +143,6 @@ static const struct tegra_machine_soc_data soc_data_tegra210 = { .is_asrc_available = false, .is_clk_rate_via_dt = false, - .write_cdev1_state = false, .write_idle_bias_off_state = false, .get_bclk_ratio = &tegra_machine_get_bclk_ratio, @@ -170,7 +168,6 @@ static const struct tegra_machine_soc_data soc_data_tegra186 = { .is_asrc_available = true, .is_clk_rate_via_dt = true, - .write_cdev1_state = true, .write_idle_bias_off_state = true, .get_bclk_ratio = &tegra_machine_get_bclk_ratio_t18x, @@ -1041,9 +1038,6 @@ static int tegra_machine_driver_probe(struct platform_device *pdev) snd_soc_card_set_drvdata(card, machine); machine->is_hs_supported = false; - if (machine->soc_data->write_cdev1_state) - machine->audio_clock.clk_cdev1_state = 0; - if (machine->soc_data->write_idle_bias_off_state) card->dapm.idle_bias_off = true; diff --git a/sound/soc/tegra-alt/tegra210_admaif_alt.c b/sound/soc/tegra-alt/tegra210_admaif_alt.c index aa66e039..6546f52b 100644 --- a/sound/soc/tegra-alt/tegra210_admaif_alt.c +++ b/sound/soc/tegra-alt/tegra210_admaif_alt.c @@ -1133,7 +1133,6 @@ static int tegra_admaif_probe(struct platform_device *pdev) goto err; } - admaif->refcnt = 0; admaif->dev = &pdev->dev; admaif->soc_data = (struct tegra_admaif_soc_data *)match->data; admaif->is_shutdown = false; diff --git a/sound/soc/tegra-alt/utils/tegra_asoc_utils_alt.c b/sound/soc/tegra-alt/utils/tegra_asoc_utils_alt.c index f44de85e..64e6857c 100644 --- a/sound/soc/tegra-alt/utils/tegra_asoc_utils_alt.c +++ b/sound/soc/tegra-alt/utils/tegra_asoc_utils_alt.c @@ -2,7 +2,7 @@ * tegra_asoc_utils_alt.c - MCLK and DAP Utility driver * * Author: Stephen Warren - * Copyright (c) 2010-2018 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2010-2019 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -173,7 +173,6 @@ int tegra_alt_asoc_utils_clk_enable(struct tegra_asoc_audio_clock_info *data) dev_err(data->dev, "Can't enable cdev1: %d\n", err); return err; } - data->clk_cdev1_state = 1; return 0; } @@ -182,7 +181,6 @@ EXPORT_SYMBOL_GPL(tegra_alt_asoc_utils_clk_enable); int tegra_alt_asoc_utils_clk_disable(struct tegra_asoc_audio_clock_info *data) { clk_disable_unprepare(data->clk_cdev1); - data->clk_cdev1_state = 0; return 0; }