From owner-svn-src-stable-10@freebsd.org Tue Sep 1 22:35:54 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 844449C77B8; Tue, 1 Sep 2015 22:35:54 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74E301722; Tue, 1 Sep 2015 22:35:54 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t81MZsxx043908; Tue, 1 Sep 2015 22:35:54 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t81MZsPf043907; Tue, 1 Sep 2015 22:35:54 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201509012235.t81MZsPf043907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Tue, 1 Sep 2015 22:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287388 - stable/10/sys/dev/sound/midi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2015 22:35:54 -0000 Author: avatar Date: Tue Sep 1 22:35:53 2015 New Revision: 287388 URL: https://svnweb.freebsd.org/changeset/base/287388 Log: MFC r286887: 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. Modified: stable/10/sys/dev/sound/midi/midi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/midi/midi.c ============================================================================== --- stable/10/sys/dev/sound/midi/midi.c Tue Sep 1 22:28:23 2015 (r287387) +++ stable/10/sys/dev/sound/midi/midi.c Tue Sep 1 22:35:53 2015 (r287388) @@ -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) {