Commit 7454fa69 authored by Dave Airlie's avatar Dave Airlie

drm: actually __set_current_state is more correct

Alan suggested using __set_current_state as being more correct for
the DRM so do that.
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 0cfaeb06
...@@ -788,7 +788,7 @@ int DRM(release)( struct inode *inode, struct file *filp ) ...@@ -788,7 +788,7 @@ int DRM(release)( struct inode *inode, struct file *filp )
add_wait_queue( &dev->lock.lock_queue, &entry ); add_wait_queue( &dev->lock.lock_queue, &entry );
for (;;) { for (;;) {
set_current_state(TASK_INTERRUPTIBLE); __set_current_state(TASK_INTERRUPTIBLE);
if ( !dev->lock.hw_lock ) { if ( !dev->lock.hw_lock ) {
/* Device has been unregistered */ /* Device has been unregistered */
retcode = -EINTR; retcode = -EINTR;
...@@ -808,7 +808,7 @@ int DRM(release)( struct inode *inode, struct file *filp ) ...@@ -808,7 +808,7 @@ int DRM(release)( struct inode *inode, struct file *filp )
break; break;
} }
} }
set_current_state(TASK_RUNNING); __set_current_state(TASK_RUNNING);
remove_wait_queue( &dev->lock.lock_queue, &entry ); remove_wait_queue( &dev->lock.lock_queue, &entry );
if( !retcode ) { if( !retcode ) {
if (dev->fn_tbl.release) if (dev->fn_tbl.release)
...@@ -988,7 +988,7 @@ int DRM(lock)( struct inode *inode, struct file *filp, ...@@ -988,7 +988,7 @@ int DRM(lock)( struct inode *inode, struct file *filp,
add_wait_queue( &dev->lock.lock_queue, &entry ); add_wait_queue( &dev->lock.lock_queue, &entry );
for (;;) { for (;;) {
set_current_state(TASK_INTERRUPTIBLE); __set_current_state(TASK_INTERRUPTIBLE);
if ( !dev->lock.hw_lock ) { if ( !dev->lock.hw_lock ) {
/* Device has been unregistered */ /* Device has been unregistered */
ret = -EINTR; ret = -EINTR;
...@@ -1009,7 +1009,7 @@ int DRM(lock)( struct inode *inode, struct file *filp, ...@@ -1009,7 +1009,7 @@ int DRM(lock)( struct inode *inode, struct file *filp,
break; break;
} }
} }
set_current_state(TASK_RUNNING); __set_current_state(TASK_RUNNING);
remove_wait_queue( &dev->lock.lock_queue, &entry ); remove_wait_queue( &dev->lock.lock_queue, &entry );
sigemptyset( &dev->sigmask ); sigemptyset( &dev->sigmask );
......
...@@ -134,7 +134,7 @@ do { \ ...@@ -134,7 +134,7 @@ do { \
add_wait_queue(&(queue), &entry); \ add_wait_queue(&(queue), &entry); \
\ \
for (;;) { \ for (;;) { \
set_current_state(TASK_INTERRUPTIBLE); \ __set_current_state(TASK_INTERRUPTIBLE); \
if (condition) \ if (condition) \
break; \ break; \
if (time_after_eq(jiffies, end)) { \ if (time_after_eq(jiffies, end)) { \
...@@ -147,7 +147,7 @@ do { \ ...@@ -147,7 +147,7 @@ do { \
break; \ break; \
} \ } \
} \ } \
set_current_state(TASK_RUNNING); \ __set_current_state(TASK_RUNNING); \
remove_wait_queue(&(queue), &entry); \ remove_wait_queue(&(queue), &entry); \
} while (0) } while (0)
......
...@@ -92,7 +92,7 @@ int i830_wait_irq(drm_device_t *dev, int irq_nr) ...@@ -92,7 +92,7 @@ int i830_wait_irq(drm_device_t *dev, int irq_nr)
add_wait_queue(&dev_priv->irq_queue, &entry); add_wait_queue(&dev_priv->irq_queue, &entry);
for (;;) { for (;;) {
set_current_state(TASK_INTERRUPTIBLE); __set_current_state(TASK_INTERRUPTIBLE);
if (atomic_read(&dev_priv->irq_received) >= irq_nr) if (atomic_read(&dev_priv->irq_received) >= irq_nr)
break; break;
if((signed)(end - jiffies) <= 0) { if((signed)(end - jiffies) <= 0) {
...@@ -112,7 +112,7 @@ int i830_wait_irq(drm_device_t *dev, int irq_nr) ...@@ -112,7 +112,7 @@ int i830_wait_irq(drm_device_t *dev, int irq_nr)
} }
} }
set_current_state(TASK_RUNNING); __set_current_state(TASK_RUNNING);
remove_wait_queue(&dev_priv->irq_queue, &entry); remove_wait_queue(&dev_priv->irq_queue, &entry);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment