ALSA: pcm: Make PCM linked list consistent while re-grouping

Make a common helper to re-assign the PCM link using list_move() instead
of open code with manual list_del() and list_add_tail().  This assures
the consistency and we can get rid of snd_pcm_group.count field -- its
purpose is only to check whether the list is singular, and we can know
it by list_is_singular() call now.

Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
Takashi Iwai 2019-01-13 09:40:21 +01:00
commit a41c4cb913
2 changed files with 20 additions and 15 deletions

View file

@ -439,7 +439,6 @@ struct snd_pcm_group { /* keep linked substreams */
spinlock_t lock;
struct mutex mutex;
struct list_head substreams;
int count;
};
struct pid;