[PATCH v2 2/4] ASoC: codecs: wcd: add multi button Headset detection support
Mark Brown
broonie at kernel.org
Thu Jun 3 14:44:55 CEST 2021
On Mon, May 24, 2021 at 12:06:58PM +0100, Srinivas Kandagatla wrote:
> + break;
> + default:
> + break;
> + }
> + return 0;
> +}
> +EXPORT_SYMBOL(wcd_mbhc_event_notify);
Why is this not EXPORT_SYMBOL_GPL? Same for the other symbols that are
exported, between ASoC and regmap I'm not clear that there's anything
useful that is usable from non-GPL code...
> + /* Report insertion */
> + if (jack_type == SND_JACK_HEADPHONE)
> + mbhc->current_plug = MBHC_PLUG_TYPE_HEADPHONE;
> + else if (jack_type == SND_JACK_HEADSET) {
> + mbhc->current_plug = MBHC_PLUG_TYPE_HEADSET;
> + mbhc->jiffies_atreport = jiffies;
> + } else if (jack_type == SND_JACK_LINEOUT)
> + mbhc->current_plug = MBHC_PLUG_TYPE_HIGH_HPH;
This would be more idiomatically written as a switch statement.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210603/5e7ae128/attachment.sig>
More information about the Alsa-devel
mailing list