mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
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>
This commit is contained in:
parent
1f3e09e759
commit
79c222bcb7
3 changed files with 0 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue