Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Aug 2015 13:16:06 +0000 (UTC)
From:      Tai-hwa Liang <avatar@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286887 - head/sys/dev/sound/midi
Message-ID:  <201508181316.t7IDG6e9031542@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avatar
Date: Tue Aug 18 13:16:06 2015
New Revision: 286887
URL: https://svnweb.freebsd.org/changeset/base/286887

Log:
  Using the error return code documented in the comment.
  
  Though there is no direct midi_uninit() caller amongst existing drivers
  at this moment, a quick experiment indicates that EBUSY gives users more
  precise error message once drivers start to honour this result.  For example,
  emu_midi_detach() should check the result of mpu401_uninit() and block
  module unloading if there is any MIDI I/O in progress.
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/sound/midi/midi.c

Modified: head/sys/dev/sound/midi/midi.c
==============================================================================
--- head/sys/dev/sound/midi/midi.c	Tue Aug 18 12:50:46 2015	(r286886)
+++ head/sys/dev/sound/midi/midi.c	Tue Aug 18 13:16:06 2015	(r286887)
@@ -403,7 +403,7 @@ midi_uninit(struct snd_midi *m)
 {
 	int err;
 
-	err = ENXIO;
+	err = EBUSY;
 	mtx_lock(&midistat_lock);
 	mtx_lock(&m->lock);
 	if (m->busy) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508181316.t7IDG6e9031542>