]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
drm: don't cast a pointer to pointer of list_head
authorLi Zefan <lizf@cn.fujitsu.com>
Sun, 16 Dec 2007 23:47:19 +0000 (09:47 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 7 Feb 2008 05:09:39 +0000 (15:09 +1000)
The casting is safe only when the list_head member is the first member of
the structure.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/i915_irq.c

index 3f02ff593bbd5a959237fa43c2c04d73635d9c37..b273fe4e1345f49b5d009950f77f38bb3269a944 100644 (file)
@@ -555,7 +555,7 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
 
        spin_lock_irqsave(&dev_priv->swaps_lock, irqflags);
 
-       list_add_tail((struct list_head *)vbl_swap, &dev_priv->vbl_swaps.head);
+       list_add_tail(&vbl_swap->head, &dev_priv->vbl_swaps.head);
        dev_priv->swaps_pending++;
 
        spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);