Re: [PATCH 2/7] ark3116: (3rd try) Make existing functions 16450-aware and add close and release functions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Sonntag, 25. Oktober 2009 18:50:59 schrieb bart.hartgers@xxxxxxxxx:
> +static void ark3116_close(struct usb_serial_port *port)
> +{
> +       struct usb_serial *serial = port->serial;
>  
> -       /* TEST ARK3116_SND(154, 0xFE, 0x40, 0xFFFF, 0x0006); */
> +       /* disable DMA */
> +       ark3116_write_reg(serial, UART_FCR, 0);
>  
> -       kfree(buf);
> +       /* deactivate interrupts */
> +       ark3116_write_reg(serial, UART_IER, 0);
>  
> -       return;
> +       if (serial->dev) {
> +               /* shutdown any bulk reads that might be going on */
> +               if (serial->num_bulk_out)
> +                       usb_kill_urb(port->write_urb);
> +               if (serial->num_bulk_in)
> +                       usb_kill_urb(port->read_urb);
> +               if (serial->num_interrupt_in)
> +                       usb_kill_urb(port->interrupt_in_urb);
> +       }
>  }

Why are the killings done on condition of serial-> != NULL but the registers
are set unconditionally?

	Regards
		Oliver

ÿôèº{.nÇ+?·?®?­?+%?Ëÿ±éݶ¥?wÿº{.nÇ+?·¥?{±þëþ)í?æèw*jg¬±š¶????Ý¢jÿŸ«þG«?éÿ¢ž¢·Šj:+v?š?wèjØm¶?ÿþø¯ù®w¥þ?àþf£¢·h??â?úÿ?Ù¥


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux