- if (serial->dev) {
- /* The bulkreadcompletion routine will check
- * this flag and dump add read data */
- edge_port->close_pending = 1;
-
- /* chase the port close */
- TIChasePort (edge_port);
-
- usb_unlink_urb (port->read_urb);
-
- /* assuming we can still talk to the device,
- * send a close port command to it */
- dbg("%s - send umpc_close_port", __FUNCTION__);
- port_number = port->number - port->serial->minor;
- status = TIWriteCommandSync (port->serial->dev,
- UMPC_CLOSE_PORT,
- (__u8)(UMPM_UART1_PORT + port_number),
- 0,
- NULL,
- 0);
- --edge_port->edge_serial->num_ports_open;
- if (edge_port->edge_serial->num_ports_open <= 0) {
- /* last port is now closed, let's shut down our interrupt urb */
- usb_unlink_urb (serial->port[0]->interrupt_in_urb);
- edge_port->edge_serial->num_ports_open = 0;
- }
- edge_port->close_pending = 0;
+ /* The bulkreadcompletion routine will check
+ * this flag and dump add read data */
+ edge_port->close_pending = 1;
+
+ /* chase the port close */
+ TIChasePort (edge_port);
+
+ usb_unlink_urb (port->read_urb);
+
+ /* assuming we can still talk to the device,
+ * send a close port command to it */
+ dbg("%s - send umpc_close_port", __FUNCTION__);
+ port_number = port->number - port->serial->minor;
+ status = TIWriteCommandSync (port->serial->dev,
+ UMPC_CLOSE_PORT,
+ (__u8)(UMPM_UART1_PORT + port_number),
+ 0,
+ NULL,
+ 0);
+ --edge_port->edge_serial->num_ports_open;
+ if (edge_port->edge_serial->num_ports_open <= 0) {
+ /* last port is now closed, let's shut down our interrupt urb */
+ usb_unlink_urb (port->serial->port[0]->interrupt_in_urb);
+ edge_port->edge_serial->num_ports_open = 0;