mos7720.c (aa1262b3876ec5249ff464618a7dcd46b3ca54e2) mos7720.c (6aad04f21374633bd8cecf25024553d1e11a9522)
1/*
2 * mos7720.c
3 * Controls the Moschip 7720 usb to dual port serial convertor
4 *
5 * Copyright 2006 Moschip Semiconductor Tech. Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

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

927/*
928 * mos7720_bulk_out_data_callback
929 * this is the callback function for when we have finished sending serial
930 * data on the bulk out endpoint.
931 */
932static void mos7720_bulk_out_data_callback(struct urb *urb)
933{
934 struct moschip_port *mos7720_port;
1/*
2 * mos7720.c
3 * Controls the Moschip 7720 usb to dual port serial convertor
4 *
5 * Copyright 2006 Moschip Semiconductor Tech. Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

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

927/*
928 * mos7720_bulk_out_data_callback
929 * this is the callback function for when we have finished sending serial
930 * data on the bulk out endpoint.
931 */
932static void mos7720_bulk_out_data_callback(struct urb *urb)
933{
934 struct moschip_port *mos7720_port;
935 struct tty_struct *tty;
936 int status = urb->status;
937
938 if (status) {
939 dev_dbg(&urb->dev->dev, "nonzero write bulk status received:%d\n", status);
940 return;
941 }
942
943 mos7720_port = urb->context;
944 if (!mos7720_port) {
945 dev_dbg(&urb->dev->dev, "NULL mos7720_port pointer\n");
946 return ;
947 }
948
935 int status = urb->status;
936
937 if (status) {
938 dev_dbg(&urb->dev->dev, "nonzero write bulk status received:%d\n", status);
939 return;
940 }
941
942 mos7720_port = urb->context;
943 if (!mos7720_port) {
944 dev_dbg(&urb->dev->dev, "NULL mos7720_port pointer\n");
945 return ;
946 }
947
949 tty = tty_port_tty_get(&mos7720_port->port->port);
950
951 if (tty && mos7720_port->open)
952 tty_wakeup(tty);
953 tty_kref_put(tty);
948 if (mos7720_port->open)
949 tty_port_tty_wakeup(&mos7720_port->port->port);
954}
955
956/*
957 * mos77xx_probe
958 * this function installs the appropriate read interrupt endpoint callback
959 * depending on whether the device is a 7720 or 7715, thus avoiding costly
960 * run-time checks in the high-frequency callback routine itself.
961 */

--- 1167 unchanged lines hidden ---
950}
951
952/*
953 * mos77xx_probe
954 * this function installs the appropriate read interrupt endpoint callback
955 * depending on whether the device is a 7720 or 7715, thus avoiding costly
956 * run-time checks in the high-frequency callback routine itself.
957 */

--- 1167 unchanged lines hidden ---