Module Name: src
Committed By: msaitoh
Date: Tue Jul 24 03:58:36 UTC 2018
Modified Files:
src/sys/dev/usb: usbdi_util.c
Log Message:
On detach, print error message with aprint_error_dev() instead of printf().
To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/usb/usbdi_util.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/usbdi_util.c
diff -u src/sys/dev/usb/usbdi_util.c:1.70 src/sys/dev/usb/usbdi_util.c:1.71
--- src/sys/dev/usb/usbdi_util.c:1.70 Sat Oct 28 00:37:13 2017
+++ src/sys/dev/usb/usbdi_util.c Tue Jul 24 03:58:36 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi_util.c,v 1.70 2017/10/28 00:37:13 pgoyette Exp $ */
+/* $NetBSD: usbdi_util.c,v 1.71 2018/07/24 03:58:36 msaitoh Exp $ */
/*
* Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.70 2017/10/28 00:37:13 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.71 2018/07/24 03:58:36 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -558,8 +558,7 @@ usb_detach_wait(device_t dv, kcondvar_t
DPRINTFN(1, "waiting for dv %#jx", (uintptr_t)dv, 0, 0, 0);
if (cv_timedwait(cv, lock, hz * 60)) // dv, PZERO, "usbdet", hz * 60
- printf("usb_detach_wait: %s didn't detach\n",
- device_xname(dv));
+ aprint_error_dev(dv, "usb_detach_wait: didn't detach\n");
DPRINTFN(1, "done", 0, 0, 0, 0);
}
@@ -579,8 +578,7 @@ usb_detach_waitold(device_t dv)
DPRINTFN(1, "waiting for dv %#jx", (uintptr_t)dv, 0, 0, 0);
if (tsleep(dv, PZERO, "usbdet", hz * 60)) /* XXXSMP ok */
- printf("usb_detach_waitold: %s didn't detach\n",
- device_xname(dv));
+ aprint_error_dev(dv, "usb_detach_waitold: didn't detach\n");
DPRINTFN(1, "done", 0, 0, 0, 0);
}