Commit 79c222bc authored by Vaibhav Agarwal's avatar Vaibhav Agarwal Committed by Greg Kroah-Hartman

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: default avatarVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: default avatarMark Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 1f3e09e7
......@@ -707,15 +707,6 @@ static int gbaudio_init_jack(struct gbaudio_module_info *module,
{
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,
......
......@@ -175,7 +175,6 @@ struct gbaudio_module_info {
/* 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;
......
......@@ -1065,7 +1065,6 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment