usb: gadget: at91_udc: move prepare clk into process context
authorRonald Wahl <ronald.wahl@raritan.com>
Wed, 19 Nov 2014 15:37:27 +0000 (16:37 +0100)
committerFelipe Balbi <balbi@ti.com>
Thu, 20 Nov 2014 19:50:17 +0000 (13:50 -0600)
commitb2ba27a5c56ff7204d8a8684893d64d4afe2cee5
tree0531ca8bcf629ac59cda80933a3b82c772ea576a
parentcf0b1d1309790fbae27e7276ae4cb30c38ac9fc8
usb: gadget: at91_udc: move prepare clk into process context

Commit 7628083227b6bc4a7e33d7c381d7a4e558424b6b (usb: gadget: at91_udc:
prepare clk before calling enable) added clock preparation in interrupt
context. This is not allowed as it might sleep. Also setting the clock
rate is unsafe to call from there for the same reason. Move clock
preparation and setting clock rate into process context (at91udc_probe).

Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/at91_udc.c