git: 16bdecce64b4 - main - Revert "sound/midi: Drain the mpu401 callout before device teardown"

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Fri, 13 Nov 2026 11:39:56 UTC
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=16bdecce64b491e826917b438c6b1a4af078c7e7

commit 16bdecce64b491e826917b438c6b1a4af078c7e7
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-11-13 11:39:24 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-11-13 11:39:24 +0000

    Revert "sound/midi: Drain the mpu401 callout before device teardown"
    
    This was committed to main by accident, but was also buggy.
    
    This reverts commit 91539591d7f8dd8ca24ced875bd16c3ba3c7d201.
---
 sys/dev/sound/midi/mpu401.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c
index 775d1905eeff..20da11216c43 100644
--- a/sys/dev/sound/midi/mpu401.c
+++ b/sys/dev/sound/midi/mpu401.c
@@ -154,10 +154,8 @@ int
 mpu401_uninit(struct mpu401 *m)
 {
 	CMD(m, MPU_RESET);
-	/* Clear M_TXPEND so that the callout does not re-arm itself. */
-	m->flags = 0;
-	callout_drain(&m->timer);
 	midi_uninit(m->mid);
+	callout_drain(&m->timer);
 	kobj_delete((kobj_t)m, M_MIDI);
 	return 0;
 }