static int msm8930_auxpcm_startup(struct snd_pcm_substream *substream) { int ret = 0; pr_debug("%s(): substream = %s\n", __func__, substream->name); ret = msm8930_aux_pcm_get_gpios(); if (ret < 0) { pr_err("%s: Aux PCM GPIO request failed\n", __func__); return -EINVAL; } return 0; }
static int msm8930_auxpcm_startup(struct snd_pcm_substream *substream) { int ret = 0; pr_debug("%s(): substream = %s, auxpcm_rsc_ref counter = %d\n", __func__, substream->name, atomic_read(&auxpcm_rsc_ref)); if (atomic_inc_return(&auxpcm_rsc_ref) == 1) ret = msm8930_aux_pcm_get_gpios(); if (ret < 0) { pr_err("%s: Aux PCM GPIO request failed\n", __func__); return -EINVAL; } return 0; }