aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-07-17 15:25:38 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-20 16:35:49 -0400
commit09df5cbe46511611410274f09571ada229231ddb (patch)
tree57a20892604a12785a883654c248b95d096c47b9 /drivers/media
parenta2d66a37c743ba201e85c93c4ec29d58ca94b728 (diff)
V4L/DVB (5858): Use msecs_to_jiffies instead of HZ on media/video I2C drivers
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/bt866.c2
-rw-r--r--drivers/media/video/saa5249.c8
-rw-r--r--drivers/media/video/saa7110.c4
-rw-r--r--drivers/media/video/tvaudio.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/bt866.c b/drivers/media/video/bt866.c
index 2e4cf1efdd21..b767b098d14b 100644
--- a/drivers/media/video/bt866.c
+++ b/drivers/media/video/bt866.c
@@ -257,7 +257,7 @@ static int bt866_write(struct bt866 *encoder,
257 printk(KERN_WARNING "%s: I/O error #%d " 257 printk(KERN_WARNING "%s: I/O error #%d "
258 "(write 0x%02x/0x%02x)\n", 258 "(write 0x%02x/0x%02x)\n",
259 encoder->i2c->name, err, encoder->addr, subaddr); 259 encoder->i2c->name, err, encoder->addr, subaddr);
260 schedule_timeout_interruptible(HZ/10); 260 schedule_timeout_interruptible(msecs_to_jiffies(100));
261 } 261 }
262 if (err == 3) { 262 if (err == 3) {
263 printk(KERN_WARNING "%s: giving up\n", 263 printk(KERN_WARNING "%s: giving up\n",
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c
index f2a2f34cd626..17f1e2e9a66b 100644
--- a/drivers/media/video/saa5249.c
+++ b/drivers/media/video/saa5249.c
@@ -86,9 +86,9 @@ static const int disp_modes[8][3] =
86 86
87 87
88 88
89#define PAGE_WAIT (300*HZ/1000) /* Time between requesting page and */ 89#define PAGE_WAIT msecs_to_jiffies(300) /* Time between requesting page and */
90 /* checking status bits */ 90 /* checking status bits */
91#define PGBUF_EXPIRE (15*HZ) /* Time to wait before retransmitting */ 91#define PGBUF_EXPIRE msecs_to_jiffies(15000) /* Time to wait before retransmitting */
92 /* page regardless of infobits */ 92 /* page regardless of infobits */
93typedef struct { 93typedef struct {
94 u8 pgbuf[VTX_VIRTUALSIZE]; /* Page-buffer */ 94 u8 pgbuf[VTX_VIRTUALSIZE]; /* Page-buffer */
@@ -115,8 +115,8 @@ struct saa5249_device
115#define CCTWR 34 /* I²C write/read-address of vtx-chip */ 115#define CCTWR 34 /* I²C write/read-address of vtx-chip */
116#define CCTRD 35 116#define CCTRD 35
117#define NOACK_REPEAT 10 /* Retry access this many times on failure */ 117#define NOACK_REPEAT 10 /* Retry access this many times on failure */
118#define CLEAR_DELAY (HZ/20) /* Time required to clear a page */ 118#define CLEAR_DELAY msecs_to_jiffies(50) /* Time required to clear a page */
119#define READY_TIMEOUT (30*HZ/1000) /* Time to wait for ready signal of I²C-bus interface */ 119#define READY_TIMEOUT msecs_to_jiffies(30) /* Time to wait for ready signal of I2C-bus interface */
120#define INIT_DELAY 500 /* Time in usec to wait at initialization of CEA interface */ 120#define INIT_DELAY 500 /* Time in usec to wait at initialization of CEA interface */
121#define START_DELAY 10 /* Time in usec to wait before starting write-cycle (CEA) */ 121#define START_DELAY 10 /* Time in usec to wait before starting write-cycle (CEA) */
122 122
diff --git a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c
index 676b9970eb2e..061134a7ba9f 100644
--- a/drivers/media/video/saa7110.c
+++ b/drivers/media/video/saa7110.c
@@ -208,7 +208,7 @@ determine_norm (struct i2c_client *client)
208 saa7110_write_block(client, initseq, sizeof(initseq)); 208 saa7110_write_block(client, initseq, sizeof(initseq));
209 saa7110_selmux(client, decoder->input); 209 saa7110_selmux(client, decoder->input);
210 prepare_to_wait(&decoder->wq, &wait, TASK_UNINTERRUPTIBLE); 210 prepare_to_wait(&decoder->wq, &wait, TASK_UNINTERRUPTIBLE);
211 schedule_timeout(HZ/4); 211 schedule_timeout(msecs_to_jiffies(250));
212 finish_wait(&decoder->wq, &wait); 212 finish_wait(&decoder->wq, &wait);
213 status = saa7110_read(client); 213 status = saa7110_read(client);
214 if (status & 0x40) { 214 if (status & 0x40) {
@@ -249,7 +249,7 @@ determine_norm (struct i2c_client *client)
249 //saa7110_write(client,0x2E,0x9A); 249 //saa7110_write(client,0x2E,0x9A);
250 250
251 prepare_to_wait(&decoder->wq, &wait, TASK_UNINTERRUPTIBLE); 251 prepare_to_wait(&decoder->wq, &wait, TASK_UNINTERRUPTIBLE);
252 schedule_timeout(HZ/4); 252 schedule_timeout(msecs_to_jiffies(250));
253 finish_wait(&decoder->wq, &wait); 253 finish_wait(&decoder->wq, &wait);
254 254
255 status = saa7110_read(client); 255 status = saa7110_read(client);
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index 9da338dc4f3b..cffb011590e3 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -290,7 +290,7 @@ static int chip_thread(void *data)
290 desc->checkmode(chip); 290 desc->checkmode(chip);
291 291
292 /* schedule next check */ 292 /* schedule next check */
293 mod_timer(&chip->wt, jiffies+2*HZ); 293 mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000));
294 } 294 }
295 295
296 v4l_dbg(1, debug, &chip->c, "%s: thread exiting\n", chip->c.name); 296 v4l_dbg(1, debug, &chip->c, "%s: thread exiting\n", chip->c.name);
@@ -1770,7 +1770,7 @@ static int chip_command(struct i2c_client *client,
1770 desc->setmode(chip,VIDEO_SOUND_MONO); 1770 desc->setmode(chip,VIDEO_SOUND_MONO);
1771 if (chip->prevmode != VIDEO_SOUND_MONO) 1771 if (chip->prevmode != VIDEO_SOUND_MONO)
1772 chip->prevmode = -1; /* reset previous mode */ 1772 chip->prevmode = -1; /* reset previous mode */
1773 mod_timer(&chip->wt, jiffies+2*HZ); 1773 mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000));
1774 /* the thread will call checkmode() later */ 1774 /* the thread will call checkmode() later */
1775 } 1775 }
1776 break; 1776 break;