]> Git Repo - linux.git/commitdiff
gpu/drm: Ingenic: Fix opaque pointer casted to wrong type
authorPaul Cercueil <[email protected]>
Sat, 16 May 2020 21:50:50 +0000 (23:50 +0200)
committerPaul Cercueil <[email protected]>
Sun, 17 May 2020 12:16:15 +0000 (14:16 +0200)
The opaque pointer passed to the IRQ handler is a pointer to the
drm_device, not a pointer to our ingenic_drm structure.

It still worked, because our ingenic_drm structure contains the
drm_device as its first field, so the pointer received had the same
value, but this was not semantically correct.

Cc: [email protected] # v5.3
Fixes: 90b86fcc47b4 ("DRM: Add KMS driver for the Ingenic JZ47xx SoCs")
Signed-off-by: Paul Cercueil <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Acked-by: Sam Ravnborg <[email protected]>
drivers/gpu/drm/ingenic/ingenic-drm.c

index a5ad6a4353e144cb5e1a85d11d8d8c6691efb946..548cc25ea4abed9565f1eebed9af9aa92b908a58 100644 (file)
@@ -474,7 +474,7 @@ static int ingenic_drm_encoder_atomic_check(struct drm_encoder *encoder,
 
 static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg)
 {
-       struct ingenic_drm *priv = arg;
+       struct ingenic_drm *priv = drm_device_get_priv(arg);
        unsigned int state;
 
        regmap_read(priv->map, JZ_REG_LCD_STATE, &state);
This page took 0.057477 seconds and 4 git commands to generate.