Skip to content

Commit abf56fa

Browse files
committed
gpu/drm: Ingenic: Fix opaque pointer casted to wrong type
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]>
1 parent a53bcc1 commit abf56fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/ingenic/ingenic-drm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ static int ingenic_drm_encoder_atomic_check(struct drm_encoder *encoder,
474474

475475
static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg)
476476
{
477-
struct ingenic_drm *priv = arg;
477+
struct ingenic_drm *priv = drm_device_get_priv(arg);
478478
unsigned int state;
479479

480480
regmap_read(priv->map, JZ_REG_LCD_STATE, &state);

0 commit comments

Comments
 (0)