Blob Blame History Raw
From c7577906865c5da232c1eeabaa80129f4702290d Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Mon, 16 Aug 2021 13:56:15 +0900
Subject: [PATCH] ASoC: soc-jack: cleanup cppcheck warning for CONFIG_GPIOLIB
Git-commit: c7577906865c5da232c1eeabaa80129f4702290d
Patch-mainline: v5.15-rc1
References: jsc#PED-850

This patch cleanups below cppcheck warning.

sound/soc/soc-jack.c:21:6: style: struct member 'jack_gpio_tbl::count' is never used. [unusedStructMember]
 int count;
     ^
sound/soc/soc-jack.c:23:28: style: struct member 'jack_gpio_tbl::gpios' is never used. [unusedStructMember]
 struct snd_soc_jack_gpio *gpios;
                           ^

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tujqyols.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 sound/soc/soc-jack.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 11961e35ad02..d798765d168c 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -17,12 +17,6 @@
 #include <linux/suspend.h>
 #include <trace/events/asoc.h>
 
-struct jack_gpio_tbl {
-	int count;
-	struct snd_soc_jack *jack;
-	struct snd_soc_jack_gpio *gpios;
-};
-
 /**
  * snd_soc_jack_report - Report the current status for a jack
  *
@@ -207,6 +201,12 @@ void snd_soc_jack_notifier_unregister(struct snd_soc_jack *jack,
 EXPORT_SYMBOL_GPL(snd_soc_jack_notifier_unregister);
 
 #ifdef CONFIG_GPIOLIB
+struct jack_gpio_tbl {
+	int count;
+	struct snd_soc_jack *jack;
+	struct snd_soc_jack_gpio *gpios;
+};
+
 /* gpio detect */
 static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
 {
-- 
2.35.3