diff driver/pt1_pci.c @ 108:bc173c443e4d

make sure that wait after set_sleepmode()
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 03 Mar 2010 03:54:05 +0900
parents 6e661e828b43
children 8a2a032bfa50
line wrap: on
line diff
--- a/driver/pt1_pci.c	Sat Feb 27 04:48:25 2010 +0900
+++ b/driver/pt1_pci.c	Wed Mar 03 03:54:05 2010 +0900
@@ -1,3 +1,4 @@
+/* -*- tab-width: 4; indent-tabs-mode: t -*- */
 /* pt1-pci.c: A PT1 on PCI bus driver for Linux. */
 #define DRV_NAME	"pt1-pci"
 #include "version.h"
@@ -347,6 +348,7 @@
 					set_sleepmode(channel->ptr->regs, &channel->lock,
 								  channel->address, channel->type,
 								  TYPE_WAKEUP);
+					schedule_timeout_interruptible(msecs_to_jiffies(50));
 
 					channel->drop  = 0 ;
 					channel->valid = TRUE ;
@@ -390,6 +392,7 @@
 	/* send tuner to sleep */
 	set_sleepmode(channel->ptr->regs, &channel->lock,
 				  channel->address, channel->type, TYPE_SLEEP);
+	schedule_timeout_interruptible(msecs_to_jiffies(50));
 
 	return 0;
 }