USB: opticon: fix non-atomic allocation in write path
authorJohan Hovold <johan@kernel.org>
Wed, 29 Oct 2014 08:07:31 +0000 (09:07 +0100)
committerZefan Li <lizefan@huawei.com>
Mon, 2 Feb 2015 09:05:11 +0000 (17:05 +0800)
commit18e9928652ab76bc3044ab872199ced278e0be75
treeaaecab2f56f8ab01ee50b4d94846ac405ee118d1
parentac9428b118d6990dbfa9df97d49a7ccdb56c7736
USB: opticon: fix non-atomic allocation in write path

commit e681286de221af78fc85db9222b6a203148c005a upstream.

Write may be called from interrupt context so make sure to use
GFP_ATOMIC for all allocations in write.

Fixes: 0d930e51cfe6 ("USB: opticon: Add Opticon OPN2001 write support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/usb/serial/opticon.c