Skip to content

Commit

Permalink
USB: mos7840: replace unnecessary atomic allocations
Browse files Browse the repository at this point in the history
Use GFP_KERNEL instead of GFP_ATOMIC for allocations in set_termios and
port-setting helper which both may and do sleep.

Signed-off-by: Johan Hovold <johan@kernel.org>
  • Loading branch information
Johan Hovold committed Nov 3, 2014
1 parent 1dbd11b commit 9d38019
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/serial/mos7840.c
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,7 @@ static void mos7840_change_port_settings(struct tty_struct *tty,

if (mos7840_port->read_urb_busy == false) {
mos7840_port->read_urb_busy = true;
status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
status = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL);
if (status) {
dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n",
status);
Expand Down Expand Up @@ -1968,7 +1968,7 @@ static void mos7840_set_termios(struct tty_struct *tty,

if (mos7840_port->read_urb_busy == false) {
mos7840_port->read_urb_busy = true;
status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
status = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL);
if (status) {
dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n",
status);
Expand Down

0 comments on commit 9d38019

Please sign in to comment.