Skip to content

Commit

Permalink
Replace deprecated interruptible_sleep_on() function call with direct
Browse files Browse the repository at this point in the history
wait-queue usage.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Oct 29, 2005
1 parent e3c4807 commit db89a48
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions arch/mips/sibyte/sb1250/bcm1250_tbprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/reboot.h>
#include <linux/wait.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/sibyte/sb1250.h>
Expand Down Expand Up @@ -231,6 +232,7 @@ int sbprof_zbprof_start(struct file *filp)

int sbprof_zbprof_stop(void)
{
DEFINE_WAIT(wait);
DBG(printk(DEVNAME ": stopping\n"));

if (sbp.tb_enable) {
Expand All @@ -240,7 +242,9 @@ int sbprof_zbprof_stop(void)
this sleep happens. */
if (sbp.tb_armed) {
DBG(printk(DEVNAME ": wait for disarm\n"));
interruptible_sleep_on(&sbp.tb_sync);
prepare_to_wait(&sbp.tb_sync, &wait, TASK_INTERRUPTIBLE);
schedule();
finish_wait(&sbp.tb_sync, &wait);
DBG(printk(DEVNAME ": disarm complete\n"));
}
free_irq(K_INT_TRACE_FREEZE, &sbp);
Expand Down Expand Up @@ -348,7 +352,10 @@ static int sbprof_tb_ioctl(struct inode *inode,
error = sbprof_zbprof_stop();
break;
case SBPROF_ZBWAITFULL:
interruptible_sleep_on(&sbp.tb_read);
DEFINE_WAIT(wait);
prepare_to_wait(&sbp.tb_read, &wait, TASK_INTERRUPTIBLE);
schedule();
finish_wait(&sbp.tb_read, &wait);
/* XXXKW check if interrupted? */
return put_user(TB_FULL, (int *) arg);
default:
Expand Down

0 comments on commit db89a48

Please sign in to comment.