]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - drivers/misc/mic/scif/scif_api.c
vfs: do bulk POLL* -> EPOLL* replacement
[zynq/linux.git] / drivers / misc / mic / scif / scif_api.c
index 8a3e48ec37dd6622d40e04d63de33c7d0c45172c..7b2dddcdd46d5200421c4065e5480f5d6a0e1c29 100644 (file)
@@ -1328,7 +1328,7 @@ __scif_pollfd(struct file *f, poll_table *wait, struct scif_endpt *ep)
                        if (ep->state == SCIFEP_CONNECTED ||
                            ep->state == SCIFEP_DISCONNECTED ||
                            ep->conn_err)
-                               mask |= POLLOUT;
+                               mask |= EPOLLOUT;
                        goto exit;
                }
        }
@@ -1338,34 +1338,34 @@ __scif_pollfd(struct file *f, poll_table *wait, struct scif_endpt *ep)
                _scif_poll_wait(f, &ep->conwq, wait, ep);
                if (ep->state == SCIFEP_LISTENING) {
                        if (ep->conreqcnt)
-                               mask |= POLLIN;
+                               mask |= EPOLLIN;
                        goto exit;
                }
        }
 
        /* Endpoint is connected or disconnected */
        if (ep->state == SCIFEP_CONNECTED || ep->state == SCIFEP_DISCONNECTED) {
-               if (poll_requested_events(wait) & POLLIN)
+               if (poll_requested_events(wait) & EPOLLIN)
                        _scif_poll_wait(f, &ep->recvwq, wait, ep);
-               if (poll_requested_events(wait) & POLLOUT)
+               if (poll_requested_events(wait) & EPOLLOUT)
                        _scif_poll_wait(f, &ep->sendwq, wait, ep);
                if (ep->state == SCIFEP_CONNECTED ||
                    ep->state == SCIFEP_DISCONNECTED) {
                        /* Data can be read without blocking */
                        if (scif_rb_count(&ep->qp_info.qp->inbound_q, 1))
-                               mask |= POLLIN;
+                               mask |= EPOLLIN;
                        /* Data can be written without blocking */
                        if (scif_rb_space(&ep->qp_info.qp->outbound_q))
-                               mask |= POLLOUT;
-                       /* Return POLLHUP if endpoint is disconnected */
+                               mask |= EPOLLOUT;
+                       /* Return EPOLLHUP if endpoint is disconnected */
                        if (ep->state == SCIFEP_DISCONNECTED)
-                               mask |= POLLHUP;
+                               mask |= EPOLLHUP;
                        goto exit;
                }
        }
 
-       /* Return POLLERR if the endpoint is in none of the above states */
-       mask |= POLLERR;
+       /* Return EPOLLERR if the endpoint is in none of the above states */
+       mask |= EPOLLERR;
 exit:
        spin_unlock(&ep->lock);
        return mask;
@@ -1398,10 +1398,10 @@ scif_poll(struct scif_pollepd *ufds, unsigned int nfds, long timeout_msecs)
        pt = &table.pt;
        while (1) {
                for (i = 0; i < nfds; i++) {
-                       pt->_key = ufds[i].events | POLLERR | POLLHUP;
+                       pt->_key = ufds[i].events | EPOLLERR | EPOLLHUP;
                        mask = __scif_pollfd(ufds[i].epd->anon,
                                             pt, ufds[i].epd);
-                       mask &= ufds[i].events | POLLERR | POLLHUP;
+                       mask &= ufds[i].events | EPOLLERR | EPOLLHUP;
                        if (mask) {
                                count++;
                                pt->_qproc = NULL;