diff options
author | Robert P. J. Day <rpjday@mindspring.com> | 2007-07-16 09:46:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:49 -0400 |
commit | f3a43d3082cd9c2308612e0331ad3b1b9d3a7a33 (patch) | |
tree | fe0a76b3a104dac10c51d2a8da7772c534fbd251 /drivers | |
parent | bd58df6d522d5a9c791f6a4820e480e9be60650d (diff) |
V4L/DVB (5846): Clean up setting state and scheduling timeouts
Replace assignments to "current->state" with the preferred calls to
schedule_timeout_interruptible().
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/msp3400-driver.c | 6 | ||||
-rw-r--r-- | drivers/media/video/vino.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index 3bb7d6634862..507b1d4260ed 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -157,8 +157,7 @@ static int msp_read(struct i2c_client *client, int dev, int addr) | |||
157 | break; | 157 | break; |
158 | v4l_warn(client, "I/O error #%d (read 0x%02x/0x%02x)\n", err, | 158 | v4l_warn(client, "I/O error #%d (read 0x%02x/0x%02x)\n", err, |
159 | dev, addr); | 159 | dev, addr); |
160 | current->state = TASK_INTERRUPTIBLE; | 160 | schedule_timeout_interruptible(msecs_to_jiffies(10)); |
161 | schedule_timeout(msecs_to_jiffies(10)); | ||
162 | } | 161 | } |
163 | if (err == 3) { | 162 | if (err == 3) { |
164 | v4l_warn(client, "giving up, resetting chip. Sound will go off, sorry folks :-|\n"); | 163 | v4l_warn(client, "giving up, resetting chip. Sound will go off, sorry folks :-|\n"); |
@@ -197,8 +196,7 @@ static int msp_write(struct i2c_client *client, int dev, int addr, int val) | |||
197 | break; | 196 | break; |
198 | v4l_warn(client, "I/O error #%d (write 0x%02x/0x%02x)\n", err, | 197 | v4l_warn(client, "I/O error #%d (write 0x%02x/0x%02x)\n", err, |
199 | dev, addr); | 198 | dev, addr); |
200 | current->state = TASK_INTERRUPTIBLE; | 199 | schedule_timeout_interruptible(msecs_to_jiffies(10)); |
201 | schedule_timeout(msecs_to_jiffies(10)); | ||
202 | } | 200 | } |
203 | if (err == 3) { | 201 | if (err == 3) { |
204 | v4l_warn(client, "giving up, resetting chip. Sound will go off, sorry folks :-|\n"); | 202 | v4l_warn(client, "giving up, resetting chip. Sound will go off, sorry folks :-|\n"); |
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index 0c658b74f2c4..e94a9a6036f5 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c | |||
@@ -2077,12 +2077,10 @@ static int vino_wait_for_frame(struct vino_channel_settings *vcs) | |||
2077 | init_waitqueue_entry(&wait, current); | 2077 | init_waitqueue_entry(&wait, current); |
2078 | /* add ourselves into wait queue */ | 2078 | /* add ourselves into wait queue */ |
2079 | add_wait_queue(&vcs->fb_queue.frame_wait_queue, &wait); | 2079 | add_wait_queue(&vcs->fb_queue.frame_wait_queue, &wait); |
2080 | /* and set current state */ | ||
2081 | set_current_state(TASK_INTERRUPTIBLE); | ||
2082 | 2080 | ||
2083 | /* to ensure that schedule_timeout will return immediately | 2081 | /* to ensure that schedule_timeout will return immediately |
2084 | * if VINO interrupt was triggred meanwhile */ | 2082 | * if VINO interrupt was triggered meanwhile */ |
2085 | schedule_timeout(HZ / 10); | 2083 | schedule_timeout_interruptible(HZ / 10); |
2086 | 2084 | ||
2087 | if (signal_pending(current)) | 2085 | if (signal_pending(current)) |
2088 | err = -EINTR; | 2086 | err = -EINTR; |