Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db89a48c authored by Ralf Baechle's avatar Ralf Baechle
Browse files

Replace deprecated interruptible_sleep_on() function call with direct


wait-queue usage.

Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e3c48078
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -28,6 +28,7 @@
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/errno.h>
#include <linux/reboot.h>
#include <linux/reboot.h>
#include <linux/wait.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/sibyte/sb1250.h>
#include <asm/sibyte/sb1250.h>
@@ -231,6 +232,7 @@ int sbprof_zbprof_start(struct file *filp)


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


	if (sbp.tb_enable) {
	if (sbp.tb_enable) {
@@ -240,7 +242,9 @@ int sbprof_zbprof_stop(void)
		   this sleep happens. */
		   this sleep happens. */
		if (sbp.tb_armed) {
		if (sbp.tb_armed) {
			DBG(printk(DEVNAME ": wait for disarm\n"));
			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"));
			DBG(printk(DEVNAME ": disarm complete\n"));
		}
		}
		free_irq(K_INT_TRACE_FREEZE, &sbp);
		free_irq(K_INT_TRACE_FREEZE, &sbp);
@@ -348,7 +352,10 @@ static int sbprof_tb_ioctl(struct inode *inode,
		error = sbprof_zbprof_stop();
		error = sbprof_zbprof_stop();
		break;
		break;
	case SBPROF_ZBWAITFULL:
	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? */
		/* XXXKW check if interrupted? */
		return put_user(TB_FULL, (int *) arg);
		return put_user(TB_FULL, (int *) arg);
	default:
	default: