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

index 3d88eef..220b4be 100644 (file)
@@ -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);
@@ -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);