summaryrefslogtreecommitdiff
path: root/linux-core/drm_dma.c
diff options
context:
space:
mode:
authorLeif Delgass <ldelgass@users.sourceforge.net>2003-04-08 01:30:43 +0000
committerLeif Delgass <ldelgass@users.sourceforge.net>2003-04-08 01:30:43 +0000
commit10444e06d4f4edaf8e8cd9370f450ce7c047efac (patch)
tree294d347bd34529e341a363bc093287b5b236c601 /linux-core/drm_dma.c
parent3f7769921bd414f489d4487a5760a8d814efd51d (diff)
Use list_entry() to get container struct from struct list_head pointers.
Build fix for RedHat 9 kernel (5 args to remap_page_range()).
Diffstat (limited to 'linux-core/drm_dma.c')
-rw-r--r--linux-core/drm_dma.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/linux-core/drm_dma.c b/linux-core/drm_dma.c
index 4ea6b07d..71e25b3d 100644
--- a/linux-core/drm_dma.c
+++ b/linux-core/drm_dma.c
@@ -655,7 +655,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
* for the same vblank sequence number; nothing to be done in
* that case
*/
- list_for_each( ( (struct list_head *) vbl_sig ), &dev->vbl_sigs.head ) {
+ list_for_each_entry( vbl_sig, &dev->vbl_sigs.head, head ) {
if (vbl_sig->sequence == vblwait.request.sequence
&& vbl_sig->info.si_signo == vblwait.request.signal
&& vbl_sig->task == current)
@@ -706,19 +706,20 @@ done:
void DRM(vbl_send_signals)( drm_device_t *dev )
{
- struct list_head *tmp;
+ struct list_head *list, *tmp;
drm_vbl_sig_t *vbl_sig;
unsigned int vbl_seq = atomic_read( &dev->vbl_received );
unsigned long flags;
spin_lock_irqsave( &dev->vbl_lock, flags );
- list_for_each_safe( ( (struct list_head *) vbl_sig ), tmp, &dev->vbl_sigs.head ) {
+ list_for_each_safe( list, tmp, &dev->vbl_sigs.head ) {
+ vbl_sig = list_entry( list, drm_vbl_sig_t, head );
if ( ( vbl_seq - vbl_sig->sequence ) <= (1<<23) ) {
vbl_sig->info.si_code = vbl_seq;
send_sig_info( vbl_sig->info.si_signo, &vbl_sig->info, vbl_sig->task );
- list_del( (struct list_head *) vbl_sig );
+ list_del( list );
DRM_FREE( vbl_sig, sizeof(*vbl_sig) );