OSDN Git Service

net: usb: kaweth: Replace kaweth_control() with usb_control_msg()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 29 Sep 2020 20:25:30 +0000 (22:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Sep 2020 21:02:54 +0000 (14:02 -0700)
commitaf3563be9d09ea2c371974ee238169a680c9398a
tree641212a0e3d26f6cce36d3f30f5435fadeff10b6
parent911b8eacd738d67a43fd8b6359443ab15cc3b082
net: usb: kaweth: Replace kaweth_control() with usb_control_msg()

kaweth_control() is almost the same as usb_control_msg() except for the
memory allocation mode (GFP_ATOMIC vs GFP_NOIO) and the in_interrupt()
check.

All the invocations of kaweth_control() are within the probe function in
fully preemtible context so there is no reason to use atomic allocations,
GFP_NOIO which is used by usb_control_msg() is perfectly fine.

Replace kaweth_control() invocations from probe with usb_control_msg().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/kaweth.c