vfs: do bulk POLL* -> EPOLL* replacement
[linux-block.git] / drivers / media / pci / bt8xx / bttv-driver.c
index c988669e22ff92a6d52ab27e040c602f2a5e3f9a..f697698fe38ded00117586ada77a8eb7c3a1b13c 100644 (file)
@@ -2964,39 +2964,39 @@ static __poll_t bttv_poll(struct file *file, poll_table *wait)
        __poll_t req_events = poll_requested_events(wait);
 
        if (v4l2_event_pending(&fh->fh))
-               rc = POLLPRI;
-       else if (req_events & POLLPRI)
+               rc = EPOLLPRI;
+       else if (req_events & EPOLLPRI)
                poll_wait(file, &fh->fh.wait, wait);
 
-       if (!(req_events & (POLLIN | POLLRDNORM)))
+       if (!(req_events & (EPOLLIN | EPOLLRDNORM)))
                return rc;
 
        if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type) {
                if (!check_alloc_btres_lock(fh->btv,fh,RESOURCE_VBI))
-                       return rc | POLLERR;
+                       return rc | EPOLLERR;
                return rc | videobuf_poll_stream(file, &fh->vbi, wait);
        }
 
        if (check_btres(fh,RESOURCE_VIDEO_STREAM)) {
                /* streaming capture */
                if (list_empty(&fh->cap.stream))
-                       return rc | POLLERR;
+                       return rc | EPOLLERR;
                buf = list_entry(fh->cap.stream.next,struct bttv_buffer,vb.stream);
        } else {
                /* read() capture */
                if (NULL == fh->cap.read_buf) {
                        /* need to capture a new frame */
                        if (locked_btres(fh->btv,RESOURCE_VIDEO_STREAM))
-                               return rc | POLLERR;
+                               return rc | EPOLLERR;
                        fh->cap.read_buf = videobuf_sg_alloc(fh->cap.msize);
                        if (NULL == fh->cap.read_buf)
-                               return rc | POLLERR;
+                               return rc | EPOLLERR;
                        fh->cap.read_buf->memory = V4L2_MEMORY_USERPTR;
                        field = videobuf_next_field(&fh->cap);
                        if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,field)) {
                                kfree (fh->cap.read_buf);
                                fh->cap.read_buf = NULL;
-                               return rc | POLLERR;
+                               return rc | EPOLLERR;
                        }
                        fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf);
                        fh->cap.read_off = 0;
@@ -3007,7 +3007,7 @@ static __poll_t bttv_poll(struct file *file, poll_table *wait)
        poll_wait(file, &buf->vb.done, wait);
        if (buf->vb.state == VIDEOBUF_DONE ||
            buf->vb.state == VIDEOBUF_ERROR)
-               rc = rc | POLLIN|POLLRDNORM;
+               rc = rc | EPOLLIN|EPOLLRDNORM;
        return rc;
 }
 
@@ -3338,8 +3338,8 @@ static __poll_t radio_poll(struct file *file, poll_table *wait)
        __poll_t res = 0;
 
        if (v4l2_event_pending(&fh->fh))
-               res = POLLPRI;
-       else if (req_events & POLLPRI)
+               res = EPOLLPRI;
+       else if (req_events & EPOLLPRI)
                poll_wait(file, &fh->fh.wait, wait);
        radio_enable(btv);
        cmd.instance = file;