Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2014 22:31:20 GMT
From:      Alfred Perlstein <alfred@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/186020: adb has params to mtx_init reversed
Message-ID:  <201401222231.s0MMVKKY046589@oldred.freebsd.org>
Resent-Message-ID: <201401222240.s0MMe03x091876@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186020
>Category:       misc
>Synopsis:       adb has params to mtx_init reversed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 22 22:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Alfred Perlstein
>Release:        current
>Organization:
Norse Corporation
>Environment:
current
>Description:
Args are in wrong order to mtx_init(9)
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: adb_kbd.c
===================================================================
--- adb_kbd.c	(revision 261037)
+++ adb_kbd.c	(working copy)
@@ -304,7 +304,7 @@
 	/* Try stepping forward to the extended keyboard protocol */
 	adb_set_device_handler(dev,3);
 
-	mtx_init(&sc->sc_mutex,KBD_DRIVER_NAME,MTX_DEF,0);
+	mtx_init(&sc->sc_mutex,KBD_DRIVER_NAME,NULL, MTX_DEF);
 	cv_init(&sc->sc_cv,KBD_DRIVER_NAME);
 	callout_init(&sc->sc_repeater, 0);
 
Index: adb_mouse.c
===================================================================
--- adb_mouse.c	(revision 261037)
+++ adb_mouse.c	(working copy)
@@ -154,7 +154,7 @@
 	sc = device_get_softc(dev);
 	sc->sc_dev = dev;
 
-	mtx_init(&sc->sc_mtx,"ams",MTX_DEF,0);
+	mtx_init(&sc->sc_mtx,"ams",NULL, MTX_DEF);
 	cv_init(&sc->sc_cv,"ams");
 
 	sc->flags = 0;


>Release-Note:
>Audit-Trail:
>Unformatted:



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