fixes from kernel for 0 vs NULL - mika

main
Dave Airlie 2004-07-05 11:56:51 +00:00
parent 4cfd0d5cee
commit 3c9fb37e65
6 changed files with 10 additions and 10 deletions

View File

@ -153,7 +153,7 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf)
buf->waiting = 0;
buf->pending = 0;
buf->filp = 0;
buf->filp = NULL;
buf->used = 0;
if ( __HAVE_DMA_WAITQUEUE && waitqueue_active(&buf->dma_wait)) {

View File

@ -96,7 +96,7 @@ int DRM(lock_transfer)(drm_device_t *dev,
{
unsigned int old, new, prev;
dev->lock.filp = 0;
dev->lock.filp = NULL;
do {
old = *lock;
new = context | _DRM_LOCK_HELD;
@ -121,7 +121,7 @@ int DRM(lock_free)(drm_device_t *dev,
{
unsigned int old, new, prev;
dev->lock.filp = 0;
dev->lock.filp = NULL;
do {
old = *lock;
new = 0;

View File

@ -178,7 +178,7 @@ static int i830_map_buffer(drm_buf_t *buf, struct file *filp)
/* Real error */
DRM_ERROR("mmap error\n");
retcode = PTR_ERR(buf_priv->virtual);
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
}
up_write( &current->mm->mmap_sem );
@ -200,7 +200,7 @@ static int i830_unmap_buffer(drm_buf_t *buf)
up_write(&current->mm->mmap_sem);
buf_priv->currently_mapped = I830_BUF_UNMAPPED;
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
return retcode;
}

View File

@ -153,7 +153,7 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf)
buf->waiting = 0;
buf->pending = 0;
buf->filp = 0;
buf->filp = NULL;
buf->used = 0;
if ( __HAVE_DMA_WAITQUEUE && waitqueue_active(&buf->dma_wait)) {

View File

@ -96,7 +96,7 @@ int DRM(lock_transfer)(drm_device_t *dev,
{
unsigned int old, new, prev;
dev->lock.filp = 0;
dev->lock.filp = NULL;
do {
old = *lock;
new = context | _DRM_LOCK_HELD;
@ -121,7 +121,7 @@ int DRM(lock_free)(drm_device_t *dev,
{
unsigned int old, new, prev;
dev->lock.filp = 0;
dev->lock.filp = NULL;
do {
old = *lock;
new = 0;

View File

@ -178,7 +178,7 @@ static int i830_map_buffer(drm_buf_t *buf, struct file *filp)
/* Real error */
DRM_ERROR("mmap error\n");
retcode = PTR_ERR(buf_priv->virtual);
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
}
up_write( &current->mm->mmap_sem );
@ -200,7 +200,7 @@ static int i830_unmap_buffer(drm_buf_t *buf)
up_write(&current->mm->mmap_sem);
buf_priv->currently_mapped = I830_BUF_UNMAPPED;
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
return retcode;
}