drm/omap: Cast pointer to integer without generating warning
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 28 Jul 2021 15:19:34 +0000 (18:19 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 7 Oct 2021 02:42:15 +0000 (05:42 +0300)
On 64-bit platforms, the compiler complains that casting a void pointer
to an unsigned int loses data. Cast the pointer to a uintptr_t to fix
this.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drivers/gpu/drm/omapdrm/omap_drv.c

index f86e205..c05d397 100644 (file)
@@ -572,7 +572,7 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev)
        priv->dss->mgr_ops_priv = priv;
 
        soc = soc_device_match(omapdrm_soc_devices);
-       priv->omaprev = soc ? (unsigned int)soc->data : 0;
+       priv->omaprev = soc ? (uintptr_t)soc->data : 0;
        priv->wq = alloc_ordered_workqueue("omapdrm", 0);
 
        mutex_init(&priv->list_lock);