patch-2.4.19 linux-2.4.19/drivers/char/drm-4.0/i810_dma.c
Next file: linux-2.4.19/drivers/char/dummy_keyb.c
Previous file: linux-2.4.19/drivers/char/drm/sis_ds.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/drivers/char/drm-4.0/i810_dma.c
- Orig date:
Mon Feb 25 11:37:57 2002
diff -urN linux-2.4.18/drivers/char/drm-4.0/i810_dma.c linux-2.4.19/drivers/char/drm-4.0/i810_dma.c
@@ -280,20 +280,20 @@
if(address == 0UL)
return 0;
- atomic_inc(&virt_to_page(address)->count);
- set_bit(PG_locked, &virt_to_page(address)->flags);
+ get_page(virt_to_page(address));
+ LockPage(virt_to_page(address));
return address;
}
static void i810_free_page(drm_device_t *dev, unsigned long page)
{
+ struct page * p = virt_to_page(page);
if(page == 0UL)
return;
- atomic_dec(&virt_to_page(page)->count);
- clear_bit(PG_locked, &virt_to_page(page)->flags);
- wake_up(&virt_to_page(page)->wait);
+ put_page(p);
+ UnlockPage(p);
free_page(page);
return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)