Message ID | 0d18b8b3-562f-468e-991e-d82d40451f9a@moroto.mountain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ASoC: rt5650: add a missing unlock in rt5645_jack_detect_work() | expand |
On Mon, Dec 04, 2023 at 03:29:47PM +0300, Dan Carpenter wrote: > We recently added new locking to the rt5645_jack_detect_work() function > but this return path was accidentally overlooked. This breaks the build for me: /build/stage/linux/sound/soc/codecs/rt5645.c: In function ‘rt5645_jack_detect_wo rk’: /build/stage/linux/sound/soc/codecs/rt5645.c:3312:37: error: ‘struct rt5645_priv ’ has no member named ‘jd_mutex’ 3312 | mutex_unlock(&rt5645->jd_mutex); | ^~
On Mon, Dec 04, 2023 at 12:59:52PM +0000, Mark Brown wrote: > On Mon, Dec 04, 2023 at 03:29:47PM +0300, Dan Carpenter wrote: > > We recently added new locking to the rt5645_jack_detect_work() function > > but this return path was accidentally overlooked. > > This breaks the build for me: > > /build/stage/linux/sound/soc/codecs/rt5645.c: In function ‘rt5645_jack_detect_wo > rk’: > /build/stage/linux/sound/soc/codecs/rt5645.c:3312:37: error: ‘struct rt5645_priv > ’ has no member named ‘jd_mutex’ > 3312 | mutex_unlock(&rt5645->jd_mutex); > | ^~ I'm so puzzled by this. I'm on linux-next for Dec 4. I don't see anything which would affect this on lore... regards, dan carpenter
On Mon, Dec 04, 2023 at 04:40:55PM +0300, Dan Carpenter wrote: > On Mon, Dec 04, 2023 at 12:59:52PM +0000, Mark Brown wrote: > > ’ has no member named ‘jd_mutex’ > > 3312 | mutex_unlock(&rt5645->jd_mutex); > > | ^~ > I'm so puzzled by this. I'm on linux-next for Dec 4. I don't see > anything which would affect this on lore... Well, apart from anything else the mutex you're adding this for isn't present in the branch that has the commit that you're identifying as being fixed...
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index a0d01d71d8b5..caf922ca90f0 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3314,6 +3314,7 @@ static void rt5645_jack_detect_work(struct work_struct *work) report, SND_JACK_HEADPHONE); snd_soc_jack_report(rt5645->mic_jack, report, SND_JACK_MICROPHONE); + mutex_unlock(&rt5645->jd_mutex); return; case 4: val = snd_soc_component_read(rt5645->component, RT5645_A_JD_CTRL1) & 0x0020;
We recently added new locking to the rt5645_jack_detect_work() function but this return path was accidentally overlooked. Fixes: cdba4301adda ("ASoC: rt5650: add mutex to avoid the jack detection failure") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> --- sound/soc/codecs/rt5645.c | 1 + 1 file changed, 1 insertion(+)