staging: imx/drm: request irq only after adding the crtc
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 20 Feb 2013 02:57:01 +0000 (10:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Mar 2013 16:31:48 +0000 (09:31 -0700)
commit47b1be5c0f4ed4991f3d956dbd7ba69cb5bc521f
tree23952890412449a978d3b59ff6f10472c820e99c
parent161f440c8d915181b34f5a64f52a543beca6b1e9
staging: imx/drm: request irq only after adding the crtc

If the bootloader already enabled the display, the interrupt handler
will be called as soon as it is registered. If the CRTC is not already
added at this time, the call to imx_drm_handle_vblank will result in
a NULL pointer dereference.

The patch fixes a kernel panic [1], which has been on linux-next since
Jan 8 [2].

[1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/218858
[2] http://thread.gmane.org/gmane.linux.ports.arm.kernel/208192

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/ipuv3-crtc.c