From: Felipe Balbi Date: Mon, 2 Feb 2015 23:12:00 +0000 (-0600) Subject: usb: musb: core: add pm_runtime_irq_safe() X-Git-Tag: omap-for-v4.1/wl12xx-dt~45^2~10^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e43a0725637299a14369e3ef109c25a8ec5c008;p=pandora-kernel.git usb: musb: core: add pm_runtime_irq_safe() We need a pm_runtime_get_sync() call from within musb_gadget_pullup() to make sure registers are accessible at that time. The problem is that musb_gadget_pullup() is called with IRQs disabled and, because of that, we need to tell pm_runtime that this pm_runtime_get_sync() is IRQ safe. We can simply add pm_runtime_irq_safe(), however, because we need to make our read/write accessor function pointers have been initialized before trying to use them. This means that all pm_runtime initialization for musb_core needs to be moved down so that when we call pm_runtime_irq_safe(), the pm_runtime_get_sync() that it calls on the parent, won't cause a crash due to NULL musb_read/write accessors. Reported-by: Pali Rohár Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed