Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: soc-pcm: remove snd_soc_dpcm_stream_{lock/unlock}_irq()

soc-pcm.c has snd_soc_dpcm_stream_{lock/unlock}_irq() helper function,
but it is almost nothing help. It just makes a code complex.
Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/875xsnll85.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
c8c3d9f8 bcbbf713

+7 -18
+7 -18
sound/soc/soc-pcm.c
··· 49 49 return ret; 50 50 } 51 51 52 - static inline void snd_soc_dpcm_stream_lock_irq(struct snd_soc_pcm_runtime *rtd, 53 - int stream) 54 - { 55 - snd_pcm_stream_lock_irq(snd_soc_dpcm_get_substream(rtd, stream)); 56 - } 57 - 58 52 #define snd_soc_dpcm_stream_lock_irqsave_nested(rtd, stream, flags) \ 59 53 snd_pcm_stream_lock_irqsave_nested(snd_soc_dpcm_get_substream(rtd, stream), flags) 60 - 61 - static inline void snd_soc_dpcm_stream_unlock_irq(struct snd_soc_pcm_runtime *rtd, 62 - int stream) 63 - { 64 - snd_pcm_stream_unlock_irq(snd_soc_dpcm_get_substream(rtd, stream)); 65 - } 66 54 67 55 #define snd_soc_dpcm_stream_unlock_irqrestore(rtd, stream, flags) \ 68 56 snd_pcm_stream_unlock_irqrestore(snd_soc_dpcm_get_substream(rtd, stream), flags) ··· 248 260 struct snd_pcm_substream *substream = 249 261 snd_soc_dpcm_get_substream(fe, stream); 250 262 251 - snd_soc_dpcm_stream_lock_irq(fe, stream); 263 + snd_pcm_stream_lock_irq(substream); 252 264 if (state == SND_SOC_DPCM_UPDATE_NO && fe->dpcm[stream].trigger_pending) { 253 265 dpcm_fe_dai_do_trigger(substream, 254 266 fe->dpcm[stream].trigger_pending - 1); 255 267 fe->dpcm[stream].trigger_pending = 0; 256 268 } 257 269 fe->dpcm[stream].runtime_update = state; 258 - snd_soc_dpcm_stream_unlock_irq(fe, stream); 270 + snd_pcm_stream_unlock_irq(substream); 259 271 } 260 272 261 273 static void dpcm_set_be_update_state(struct snd_soc_pcm_runtime *be, ··· 1260 1272 dpcm->be = be; 1261 1273 dpcm->fe = fe; 1262 1274 dpcm->state = SND_SOC_DPCM_LINK_STATE_NEW; 1263 - snd_soc_dpcm_stream_lock_irq(fe, stream); 1275 + snd_pcm_stream_lock_irq(fe_substream); 1264 1276 list_add(&dpcm->list_be, &fe->dpcm[stream].be_clients); 1265 1277 list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); 1266 - snd_soc_dpcm_stream_unlock_irq(fe, stream); 1278 + snd_pcm_stream_unlock_irq(fe_substream); 1267 1279 1268 1280 dev_dbg(fe->dev, "connected new DPCM %s path %s %s %s\n", 1269 1281 snd_pcm_direction_name(stream), fe->dai_link->name, ··· 1308 1320 void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) 1309 1321 { 1310 1322 struct snd_soc_dpcm *dpcm, *d; 1323 + struct snd_pcm_substream *substream = snd_soc_dpcm_get_substream(fe, stream); 1311 1324 LIST_HEAD(deleted_dpcms); 1312 1325 1313 1326 snd_soc_dpcm_mutex_assert_held(fe); 1314 1327 1315 - snd_soc_dpcm_stream_lock_irq(fe, stream); 1328 + snd_pcm_stream_lock_irq(substream); 1316 1329 for_each_dpcm_be_safe(fe, stream, dpcm, d) { 1317 1330 dev_dbg(fe->dev, "ASoC: BE %s disconnect check for %s\n", 1318 1331 snd_pcm_direction_name(stream), ··· 1332 1343 list_del(&dpcm->list_be); 1333 1344 list_move(&dpcm->list_fe, &deleted_dpcms); 1334 1345 } 1335 - snd_soc_dpcm_stream_unlock_irq(fe, stream); 1346 + snd_pcm_stream_unlock_irq(substream); 1336 1347 1337 1348 while (!list_empty(&deleted_dpcms)) { 1338 1349 dpcm = list_first_entry(&deleted_dpcms, struct snd_soc_dpcm,