greybus: audio: Remove unnecessary num_jack field from module_info

snd_jack will be registered based on real capabilities shared by
module's FW instead of parsing widgets and register it with fixed
capabilities. Remove module_info->num_jack, since it is no more
required.

Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 6ebde18..810ac62 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -707,15 +707,6 @@
 {
 	int ret;
 
-	if (!module->num_jacks)
-		return 0;
-
-	/* register jack(s) in case any */
-	if (module->num_jacks > 1) {
-		dev_err(module->dev, "Currently supports max=1 jack\n");
-		return -EINVAL;
-	}
-
 	snprintf(module->jack_name, NAME_SIZE, "GB %d Headset Jack",
 		 module->dev_id);
 	ret = snd_soc_jack_new(codec, module->jack_name, GBCODEC_JACK_MASK,
diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index 0153809..5a397b0 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -175,7 +175,6 @@
 	/* jack related */
 	char jack_name[NAME_SIZE];
 	char button_name[NAME_SIZE];
-	int num_jacks;
 	int jack_type;
 	int button_status;
 	struct snd_soc_jack headset_jack;
diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
index e54078a..e2fc186 100644
--- a/drivers/staging/greybus/audio_topology.c
+++ b/drivers/staging/greybus/audio_topology.c
@@ -1065,7 +1065,6 @@
 	case snd_soc_dapm_hp:
 		*dw = (struct snd_soc_dapm_widget)
 			SND_SOC_DAPM_HP(w->name, gbcodec_event_hp);
-		module->num_jacks++;
 		module->op_devices |= (GBAUDIO_DEVICE_OUT_WIRED_HEADSET
 					| GBAUDIO_DEVICE_OUT_WIRED_HEADPHONE);
 		module->ip_devices |= GBAUDIO_DEVICE_IN_WIRED_HEADSET;