drm: don't cast a pointer to pointer of list_head

The casting is safe only when the list_head member is the first member of
the structure.
main
Li Zefan 2007-12-17 09:50:45 +10:00 committed by Dave Airlie
parent 6180dbda20
commit 2db6400396
1 changed files with 1 additions and 1 deletions

View File

@ -719,7 +719,7 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
DRM_SPINLOCK_IRQSAVE(&dev_priv->swaps_lock, irqflags); DRM_SPINLOCK_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++; dev_priv->swaps_pending++;
DRM_SPINUNLOCK_IRQRESTORE(&dev_priv->swaps_lock, irqflags); DRM_SPINUNLOCK_IRQRESTORE(&dev_priv->swaps_lock, irqflags);