diff options
author | 2013-11-07 11:14:26 +0000 | |
---|---|---|
committer | 2013-11-07 11:14:26 +0000 | |
commit | d4be7f5bbee876d311f9914e4c51462b617c13fc (patch) | |
tree | 469f73c71d9a3b2fd52b9b551d99f7c9e1b40f7a | |
parent | Replace sc_dying in favour of usbd_is_dying() and usbd_deactivate(). (diff) | |
download | wireguard-openbsd-d4be7f5bbee876d311f9914e4c51462b617c13fc.tar.xz wireguard-openbsd-d4be7f5bbee876d311f9914e4c51462b617c13fc.zip |
Replace sc_dying in favour of usbd_is_dying() and usbd_deactivate().
Tested and okay mpi@.
-rw-r--r-- | sys/dev/usb/uvideo.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/uvideo.h | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 5180d37d8f3..84f9f3fdf69 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.172 2013/04/26 14:53:19 mpi Exp $ */ +/* $OpenBSD: uvideo.c,v 1.173 2013/11/07 11:14:26 pirofti Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -336,7 +336,7 @@ uvideo_enable(void *v) DPRINTF(1, "%s: uvideo_enable sc=%p\n", DEVNAME(sc), sc); - if (sc->sc_dying) + if (usbd_is_dying(sc->sc_udev)) return (EIO); if (sc->sc_enabled) @@ -370,7 +370,7 @@ uvideo_open(void *addr, int flags, int *size, uint8_t *buffer, DPRINTF(1, "%s: uvideo_open: sc=%p\n", DEVNAME(sc), sc); - if (sc->sc_dying) + if (usbd_is_dying(sc->sc_udev)) return (EIO); /* pointers to upper video layer */ @@ -568,7 +568,7 @@ uvideo_activate(struct device *self, int act) case DVACT_DEACTIVATE: if (sc->sc_videodev != NULL) config_deactivate(sc->sc_videodev); - sc->sc_dying = 1; + usbd_deactivate(sc->sc_udev); break; } @@ -1929,7 +1929,7 @@ uvideo_vs_start_isoc_ixfer(struct uvideo_softc *sc, DPRINTF(2, "%s: %s\n", DEVNAME(sc), __func__); - if (sc->sc_dying) + if (usbd_is_dying(sc->sc_udev)) return; for (i = 0; i < sc->sc_nframes; i++) diff --git a/sys/dev/usb/uvideo.h b/sys/dev/usb/uvideo.h index 6036228708e..54c477e2c72 100644 --- a/sys/dev/usb/uvideo.h +++ b/sys/dev/usb/uvideo.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.h,v 1.55 2013/04/15 09:23:02 mglocker Exp $ */ +/* $OpenBSD: uvideo.h,v 1.56 2013/11/07 11:14:26 pirofti Exp $ */ /* * Copyright (c) 2007 Robert Nagy <robert@openbsd.org> @@ -668,7 +668,6 @@ struct uvideo_softc { struct device *sc_videodev; int sc_enabled; - int sc_dying; int sc_max_fbuf_size; int sc_negotiated_flag; int sc_frame_rate; |