Skip to contentSkip to conversation

mips/bcm1250_tbprof: remove

PATCH In review Nishanth Aravamudan 3 participants 3 messages Feb 2, 2005 – Feb 3, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 20/20 mips/bcm1250_tbprof: remove

Hello,

Please consider applying.

Description: Remove deprecated interruptible_sleep_on() function call and replace with direct wait-queue usage.

arch/mips/sibyte/sb1250/bcm1250_tbprof.c +9 -2
@@ -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>
@@ -227,6 +228,7 @@ int sbprof_zbprof_start(struct file *fil
 
 int sbprof_zbprof_stop(void)
 {
+	DEFINE_WAIT(wait);
 	DBG(printk(DEVNAME ": stopping\n"));
 
 	if (sbp.tb_enable) {
@@ -236,7 +238,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);
@@ -344,7 +348,10 @@ static int sbprof_tb_ioctl(struct 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:

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#2 lore raw

Re: [PATCH 20/20] mips/bcm1250_tbprof: remove interruptible_sleep_on() usage

Quoted 4 lines · Ralf Baechle
Quoted 2 lines

Description: Remove deprecated interruptible_sleep_on() function call and replace with direct wait-queue usage.

Thanks,

Except that should rather use wait_event_interruptible().

Maciej