Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Use callout_halt and usb_rem_task_wait in udav(4).



details:   https://anonhg.NetBSD.org/src/rev/3fb1305b26e4
branches:  trunk
changeset: 365046:3fb1305b26e4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Jul 29 02:01:43 2018 +0000

description:
Use callout_halt and usb_rem_task_wait in udav(4).

diffstat:

 sys/dev/usb/if_udav.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r 758823382332 -r 3fb1305b26e4 sys/dev/usb/if_udav.c
--- a/sys/dev/usb/if_udav.c     Sun Jul 29 02:01:32 2018 +0000
+++ b/sys/dev/usb/if_udav.c     Sun Jul 29 02:01:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_udav.c,v 1.53 2018/06/26 06:48:02 msaitoh Exp $     */
+/*     $NetBSD: if_udav.c,v 1.54 2018/07/29 02:01:43 riastradh Exp $   */
 /*     $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $   */
 
 /*
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.53 2018/06/26 06:48:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.54 2018/07/29 02:01:43 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -352,11 +352,11 @@
        if (!sc->sc_attached)
                return 0;
 
-       callout_stop(&sc->sc_stat_ch);
+       callout_halt(&sc->sc_stat_ch, NULL);
 
        /* Remove any pending tasks */
-       usb_rem_task(sc->sc_udev, &sc->sc_tick_task);
-       usb_rem_task(sc->sc_udev, &sc->sc_stop_task);
+       usb_rem_task_wait(sc->sc_udev, &sc->sc_tick_task, USB_TASKQ_DRIVER);
+       usb_rem_task_wait(sc->sc_udev, &sc->sc_stop_task, USB_TASKQ_DRIVER);
 
        s = splusb();
 



Home | Main Index | Thread Index | Old Index