Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a23994c authored by Hridya Valsaraju's avatar Hridya Valsaraju
Browse files

ANDROID: GKI: Resolve ABI diff for struct snd_usb_audio



Adds member 'struct mutex dev_lock' to struct snd_usb_audio.

Test: build
Bug: 151372815
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
Change-Id: I9aafd93924025e71ef1362ea225396593cd64872
(cherry picked from commit f055b384)
[hridya: partial cherry-pick from snapshot change]
Signed-off-by: default avatarHridya Valsaraju <hridya@google.com>
parent e439c4e5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -430,6 +430,7 @@ static void snd_usb_audio_free(struct snd_card *card)
	list_for_each_entry_safe(ep, n, &chip->ep_list, list)
		snd_usb_endpoint_free(ep);

	mutex_destroy(&chip->dev_lock);
	mutex_destroy(&chip->mutex);
	if (!atomic_read(&chip->shutdown))
		dev_set_drvdata(&chip->dev->dev, NULL);
@@ -557,6 +558,7 @@ static int snd_usb_audio_create(struct usb_interface *intf,

	chip = card->private_data;
	mutex_init(&chip->mutex);
	mutex_init(&chip->dev_lock);
	init_waitqueue_head(&chip->shutdown_wait);
	chip->index = idx;
	chip->dev = dev;
+5 −0
Original line number Diff line number Diff line
@@ -72,9 +72,14 @@ static void snd_usb_audio_stream_free(struct snd_usb_stream *stream)
static void snd_usb_audio_pcm_free(struct snd_pcm *pcm)
{
	struct snd_usb_stream *stream = pcm->private_data;
	struct snd_usb_audio *chip;

	if (stream) {
		mutex_lock(&stream->chip->dev_lock);
		chip = stream->chip;
		stream->pcm = NULL;
		snd_usb_audio_stream_free(stream);
		mutex_unlock(&chip->dev_lock);
	}
}

+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ struct snd_usb_audio {
					 */

	struct usb_host_interface *ctrl_intf;	/* the audio control interface */
	struct mutex dev_lock;  /* to protect any race with disconnect */
	int card_num;	/* cache pcm card number to use upon disconnect */
	void (*disconnect_cb)(struct snd_usb_audio *chip); /* callback to cleanup on disconnect */
};