From ea07fefcbf6a07048bde6e25af6b891d51bd6f9e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 11 Nov 2005 08:42:36 +0000 Subject: convert to use __set_current_state, align some header includes --- linux-core/drm_fops.c | 4 ++-- linux-core/drm_lock.c | 4 ++-- linux-core/i830_irq.c | 9 ++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c index c79372d3..410f5c81 100644 --- a/linux-core/drm_fops.c +++ b/linux-core/drm_fops.c @@ -372,7 +372,7 @@ int drm_release(struct inode *inode, struct file *filp) add_wait_queue(&dev->lock.lock_queue, &entry); for (;;) { - current->state = TASK_INTERRUPTIBLE; + __set_current_state(TASK_INTERRUPTIBLE); if (!dev->lock.hw_lock) { /* Device has been unregistered */ retcode = -EINTR; @@ -392,7 +392,7 @@ int drm_release(struct inode *inode, struct file *filp) break; } } - current->state = TASK_RUNNING; + __set_current_state(TASK_RUNNING); remove_wait_queue(&dev->lock.lock_queue, &entry); if (!retcode) { dev->driver->reclaim_buffers_locked(dev, filp); diff --git a/linux-core/drm_lock.c b/linux-core/drm_lock.c index 5557f30f..b8431698 100644 --- a/linux-core/drm_lock.c +++ b/linux-core/drm_lock.c @@ -80,7 +80,7 @@ int drm_lock(struct inode *inode, struct file *filp, add_wait_queue(&dev->lock.lock_queue, &entry); for (;;) { - current->state = TASK_INTERRUPTIBLE; + __set_current_state(TASK_INTERRUPTIBLE); if (!dev->lock.hw_lock) { /* Device has been unregistered */ ret = -EINTR; @@ -100,7 +100,7 @@ int drm_lock(struct inode *inode, struct file *filp, break; } } - current->state = TASK_RUNNING; + __set_current_state(TASK_RUNNING); remove_wait_queue(&dev->lock.lock_queue, &entry); DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" ); diff --git a/linux-core/i830_irq.c b/linux-core/i830_irq.c index a6d264ca..5841f767 100644 --- a/linux-core/i830_irq.c +++ b/linux-core/i830_irq.c @@ -26,13 +26,12 @@ * */ -#include /* For task queue support */ -#include - #include "drmP.h" #include "drm.h" #include "i830_drm.h" #include "i830_drv.h" +#include /* For task queue support */ +#include irqreturn_t i830_driver_irq_handler(DRM_IRQ_ARGS) { @@ -88,7 +87,7 @@ static int i830_wait_irq(drm_device_t * dev, int irq_nr) add_wait_queue(&dev_priv->irq_queue, &entry); for (;;) { - current->state = TASK_INTERRUPTIBLE; + __set_current_state(TASK_INTERRUPTIBLE); if (atomic_read(&dev_priv->irq_received) >= irq_nr) break; if ((signed)(end - jiffies) <= 0) { @@ -108,7 +107,7 @@ static int i830_wait_irq(drm_device_t * dev, int irq_nr) } } - current->state = TASK_RUNNING; + __set_current_state(TASK_RUNNING); remove_wait_queue(&dev_priv->irq_queue, &entry); return ret; } -- cgit v1.2.3