Deleted Added
full compact
uchcom.c (212122) uchcom.c (214761)
1/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
2
3/*-
4 * Copyright (c) 2007, Takanori Watanabe
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 49 unchanged lines hidden (view full) ---

58 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
59 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
60 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
61 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
62 * POSSIBILITY OF SUCH DAMAGE.
63 */
64
65#include <sys/cdefs.h>
1/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
2
3/*-
4 * Copyright (c) 2007, Takanori Watanabe
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 49 unchanged lines hidden (view full) ---

58 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
59 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
60 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
61 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
62 * POSSIBILITY OF SUCH DAMAGE.
63 */
64
65#include <sys/cdefs.h>
66__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uchcom.c 212122 2010-09-01 23:47:53Z thompsa $");
66__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uchcom.c 214761 2010-11-03 21:50:49Z n_hibma $");
67
68/*
69 * Driver for WinChipHead CH341/340, the worst USB-serial chip in the
70 * world.
71 */
72
73#include <sys/stdint.h>
74#include <sys/stddef.h>

--- 288 unchanged lines hidden (view full) ---

363
364static int
365uchcom_detach(device_t dev)
366{
367 struct uchcom_softc *sc = device_get_softc(dev);
368
369 DPRINTFN(11, "\n");
370
67
68/*
69 * Driver for WinChipHead CH341/340, the worst USB-serial chip in the
70 * world.
71 */
72
73#include <sys/stdint.h>
74#include <sys/stddef.h>

--- 288 unchanged lines hidden (view full) ---

363
364static int
365uchcom_detach(device_t dev)
366{
367 struct uchcom_softc *sc = device_get_softc(dev);
368
369 DPRINTFN(11, "\n");
370
371 ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
371 ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom);
372 usbd_transfer_unsetup(sc->sc_xfer, UCHCOM_N_TRANSFER);
373 mtx_destroy(&sc->sc_mtx);
374
375 return (0);
376}
377
378/* ----------------------------------------------------------------------
379 * low level i/o

--- 479 unchanged lines hidden ---
372 usbd_transfer_unsetup(sc->sc_xfer, UCHCOM_N_TRANSFER);
373 mtx_destroy(&sc->sc_mtx);
374
375 return (0);
376}
377
378/* ----------------------------------------------------------------------
379 * low level i/o

--- 479 unchanged lines hidden ---