Skip to content

Commit

Permalink
gpu/drm: Ingenic: Fix opaque pointer casted to wrong type
Browse files Browse the repository at this point in the history
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: 90b86fc ("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]>
  • Loading branch information
pcercuei committed May 17, 2020
1 parent a53bcc1 commit abf56fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ingenic/ingenic-drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit abf56fa

Please sign in to comment.