-/* $OpenBSD: ucycom.c,v 1.26 2014/04/15 09:14:27 mpi Exp $ */
+/* $OpenBSD: ucycom.c,v 1.27 2014/05/07 08:17:21 mpi Exp $ */
/* $NetBSD: ucycom.c,v 1.3 2005/08/05 07:27:47 skrll Exp $ */
/*
config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
}
+
+ if (sc->sc_hdev.sc_state & UHIDEV_OPEN)
+ uhidev_close(&sc->sc_hdev);
+
return (0);
}
-/* $OpenBSD: uoaklux.c,v 1.7 2014/03/19 08:59:37 mpi Exp $ */
+/* $OpenBSD: uoaklux.c,v 1.8 2014/05/07 08:17:21 mpi Exp $ */
/*
* Copyright (c) 2012 Yojiro UO <yuo@nui.org>
if (sc->sc_sensortask != NULL)
sensor_task_unregister(sc->sc_sensortask);
+ if (sc->sc_hdev.sc_state & UHIDEV_OPEN)
+ uhidev_close(&sc->sc_hdev);
+
if (scc->sc_ibuf != NULL) {
free(scc->sc_ibuf, M_USBDEV);
scc->sc_ibuf = NULL;
-/* $OpenBSD: uoakrh.c,v 1.8 2014/03/19 08:59:37 mpi Exp $ */
+/* $OpenBSD: uoakrh.c,v 1.9 2014/05/07 08:17:21 mpi Exp $ */
/*
* Copyright (c) 2012 Yojiro UO <yuo@nui.org>
if (sc->sc_sensortask != NULL)
sensor_task_unregister(sc->sc_sensortask);
+ if (sc->sc_hdev.sc_state & UHIDEV_OPEN)
+ uhidev_close(&sc->sc_hdev);
+
if (scc->sc_ibuf != NULL) {
free(scc->sc_ibuf, M_USBDEV);
scc->sc_ibuf = NULL;
-/* $OpenBSD: uoakv.c,v 1.7 2014/03/19 08:59:37 mpi Exp $ */
+/* $OpenBSD: uoakv.c,v 1.8 2014/05/07 08:17:21 mpi Exp $ */
/*
* Copyright (c) 2012 Yojiro UO <yuo@nui.org>
if (sc->sc_sensortask != NULL)
sensor_task_unregister(sc->sc_sensortask);
+ if (sc->sc_hdev.sc_state & UHIDEV_OPEN)
+ uhidev_close(&sc->sc_hdev);
+
if (scc->sc_ibuf != NULL) {
free(scc->sc_ibuf, M_USBDEV);
scc->sc_ibuf = NULL;
-/* $OpenBSD: utrh.c,v 1.14 2014/04/15 09:14:27 mpi Exp $ */
+/* $OpenBSD: utrh.c,v 1.15 2014/05/07 08:17:21 mpi Exp $ */
/*
* Copyright (c) 2009 Yojiro UO <yuo@nui.org>
sensor_task_unregister(sc->sc_sensortask);
}
+ if (sc->sc_hdev.sc_state & UHIDEV_OPEN)
+ uhidev_close(&sc->sc_hdev);
+
if (sc->sc_ibuf != NULL) {
free(sc->sc_ibuf, M_USBDEV);
sc->sc_ibuf = NULL;
-/* $OpenBSD: utwitch.c,v 1.11 2014/04/15 09:14:27 mpi Exp $ */
+/* $OpenBSD: utwitch.c,v 1.12 2014/05/07 08:17:21 mpi Exp $ */
/*
* Copyright (c) 2010 Yojiro UO <yuo@nui.org>
if (sc->sc_sensortask != NULL)
sensor_task_unregister(sc->sc_sensortask);
+ if (sc->sc_hdev.sc_state & UHIDEV_OPEN)
+ uhidev_close(&sc->sc_hdev);
+
if (sc->sc_ibuf != NULL) {
free(sc->sc_ibuf, M_USBDEV);
sc->sc_ibuf = NULL;