diff options
Diffstat (limited to 'drivers/char/nwbutton.c')
-rw-r--r-- | drivers/char/nwbutton.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/nwbutton.c b/drivers/char/nwbutton.c index 1fd00dc06897..76c490fa0511 100644 --- a/drivers/char/nwbutton.c +++ b/drivers/char/nwbutton.c | |||
@@ -168,7 +168,10 @@ static irqreturn_t button_handler (int irq, void *dev_id) | |||
168 | static int button_read (struct file *filp, char __user *buffer, | 168 | static int button_read (struct file *filp, char __user *buffer, |
169 | size_t count, loff_t *ppos) | 169 | size_t count, loff_t *ppos) |
170 | { | 170 | { |
171 | interruptible_sleep_on (&button_wait_queue); | 171 | DEFINE_WAIT(wait); |
172 | prepare_to_wait(&button_wait_queue, &wait, TASK_INTERRUPTIBLE); | ||
173 | schedule(); | ||
174 | finish_wait(&button_wait_queue, &wait); | ||
172 | return (copy_to_user (buffer, &button_output_buffer, bcount)) | 175 | return (copy_to_user (buffer, &button_output_buffer, bcount)) |
173 | ? -EFAULT : bcount; | 176 | ? -EFAULT : bcount; |
174 | } | 177 | } |