sound: rawmidi: Move spinlock under realloc_mutex

A merge conflict resolution of commit e57f781805f0 ("ANDROID: sound:
rawmidi: Hold lock around realloc") placed a realloc_mutex lock
inside of a runtime->lock irq spinlock. The mutex lock has to
encompass the spinlock to avoid attempts to sleep in an invalid
context.

Change-Id: I9333a01615c54fea3788f32955f40ae4b7a812a0
Signed-off-by: Dennis Cagle <dcagle@codeaurora.org>
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 5143801..180261d 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -976,9 +976,9 @@
 	struct snd_rawmidi_runtime *runtime = substream->runtime;
 	unsigned long appl_ptr;
 
-	spin_lock_irqsave(&runtime->lock, flags);
 	if (userbuf)
 		mutex_lock(&runtime->realloc_mutex);
+	spin_lock_irqsave(&runtime->lock, flags);
 	while (count > 0 && runtime->avail) {
 		count1 = runtime->buffer_size - runtime->appl_ptr;
 		if (count1 > count)