usb_serial.c (192984) | usb_serial.c (193018) |
---|---|
1/* $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $ */ 2 3/*- 4 * Copyright (c) 2001-2003, 2005, 2008 5 * Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/* $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $ */ 2 3/*- 4 * Copyright (c) 2001-2003, 2005, 2008 5 * Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/usb/serial/usb_serial.c 192984 2009-05-28 17:36:36Z thompsa $"); | 31__FBSDID("$FreeBSD: head/sys/dev/usb/serial/usb_serial.c 193018 2009-05-29 06:41:23Z ed $"); |
32 33/*- 34 * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. 35 * All rights reserved. 36 * 37 * This code is derived from software contributed to The NetBSD Foundation 38 * by Lennart Augustsson (lennart@augustsson.net) at 39 * Carlstedt Research & Technology. --- 248 unchanged lines hidden (view full) --- 288 289static int 290usb2_com_attach_tty(struct ucom_softc *sc, uint32_t sub_units) 291{ 292 struct tty *tp; 293 int error = 0; 294 char buf[32]; /* temporary TTY device name buffer */ 295 | 32 33/*- 34 * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. 35 * All rights reserved. 36 * 37 * This code is derived from software contributed to The NetBSD Foundation 38 * by Lennart Augustsson (lennart@augustsson.net) at 39 * Carlstedt Research & Technology. --- 248 unchanged lines hidden (view full) --- 288 289static int 290usb2_com_attach_tty(struct ucom_softc *sc, uint32_t sub_units) 291{ 292 struct tty *tp; 293 int error = 0; 294 char buf[32]; /* temporary TTY device name buffer */ 295 |
296 tp = tty_alloc(&usb2_com_class, sc, sc->sc_mtx); | 296 tp = tty_alloc_mutex(&usb2_com_class, sc, sc->sc_mtx); |
297 if (tp == NULL) { 298 error = ENOMEM; 299 goto done; 300 } 301 DPRINTF("tp = %p, unit = %d\n", tp, sc->sc_unit); 302 303 buf[0] = 0; /* set some default value */ 304 --- 818 unchanged lines hidden --- | 297 if (tp == NULL) { 298 error = ENOMEM; 299 goto done; 300 } 301 DPRINTF("tp = %p, unit = %d\n", tp, sc->sc_unit); 302 303 buf[0] = 0; /* set some default value */ 304 --- 818 unchanged lines hidden --- |