1848 spin_unlock_irqrestore(&priv->rx_lock, flags);
1849
1850 ftdi_process_read(&priv->rx_work.work);
1851out:
1852 tty_kref_put(tty);
1853}
1854
1855
1856static void ftdi_process_read(struct work_struct *work)
1857{
1858 struct ftdi_private *priv =
1859 container_of(work, struct ftdi_private, rx_work.work);
1860 struct usb_serial_port *port = priv->port;
1861 struct urb *urb;
1862 struct tty_struct *tty;
1863 char error_flag;
1864 unsigned char *data;
1865
1866 int i;
1867 int result;
1868 int need_flip;
1869 int packet_offset;
1870 unsigned long flags;
1871
1872 dbg("%s - port %d", __func__, port->number);
1873
1874 if (port->port.count <= 0)
1875 return;
1876
1877 tty = tty_port_tty_get(&port->port);
1878 if (!tty) {
1879 dbg("%s - bad tty pointer - exiting", __func__);
1880 return;
1881 }
1882
1883 priv = usb_get_serial_port_data(port);
1884 if (!priv) {
1885 dbg("%s - bad port private data pointer - exiting", __func__);
1886 goto out;
1887 }
1888