USB: mos7720: replace unnecessary atomic allocations
authorJohan Hovold <johan@kernel.org>
Wed, 29 Oct 2014 08:07:33 +0000 (09:07 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 3 Nov 2014 08:15:17 +0000 (09:15 +0100)
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>
drivers/usb/serial/mos7720.c

index dfd728a263d29bbc522e20d52448c7da4c977fc9..312b0fee8d54035e0bfa35c4bd6f40b2be786799 100644 (file)
@@ -1657,7 +1657,7 @@ static void change_port_settings(struct tty_struct *tty,
        write_mos_reg(serial, port_number, IER, 0x0c);
 
        if (port->read_urb->status != -EINPROGRESS) {
-               status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+               status = usb_submit_urb(port->read_urb, GFP_KERNEL);
                if (status)
                        dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", status);
        }
@@ -1702,7 +1702,7 @@ static void mos7720_set_termios(struct tty_struct *tty,
        change_port_settings(tty, mos7720_port, old_termios);
 
        if (port->read_urb->status != -EINPROGRESS) {
-               status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+               status = usb_submit_urb(port->read_urb, GFP_KERNEL);
                if (status)
                        dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", status);
        }