Skip to content

Commit

Permalink
USB: serial: export generic throttle and unthrottle
Browse files Browse the repository at this point in the history
Allow drivers to use the generic throttle and unthrottle implementation.
This makes sense for drivers using the generic read functionality.

Note that drivers need to set these explicitly in order to enable them
(i.e., we do not set them at port probe if not defined).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed May 20, 2010
1 parent f08e07a commit f1e949a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/serial/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ void usb_serial_generic_throttle(struct tty_struct *tty)
port->throttle_req = 1;
spin_unlock_irqrestore(&port->lock, flags);
}
EXPORT_SYMBOL_GPL(usb_serial_generic_throttle);

void usb_serial_generic_unthrottle(struct tty_struct *tty)
{
Expand All @@ -534,6 +535,7 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty)
if (was_throttled)
usb_serial_generic_submit_read_urb(port, GFP_KERNEL);
}
EXPORT_SYMBOL_GPL(usb_serial_generic_unthrottle);

#ifdef CONFIG_MAGIC_SYSRQ
int usb_serial_handle_sysrq_char(struct tty_struct *tty,
Expand Down

0 comments on commit f1e949a

Please sign in to comment.