vfs: do bulk POLL* -> EPOLL* replacement
[linux-2.6-block.git] / drivers / scsi / sg.c
index 0c434453aab38386d6d0c2b727568141fc205aa1..c198b96368dd69beba2dcffbe16efe7a3c74ae1d 100644 (file)
@@ -1152,27 +1152,27 @@ sg_poll(struct file *filp, poll_table * wait)
 
        sfp = filp->private_data;
        if (!sfp)
-               return POLLERR;
+               return EPOLLERR;
        sdp = sfp->parentdp;
        if (!sdp)
-               return POLLERR;
+               return EPOLLERR;
        poll_wait(filp, &sfp->read_wait, wait);
        read_lock_irqsave(&sfp->rq_list_lock, iflags);
        list_for_each_entry(srp, &sfp->rq_list, entry) {
                /* if any read waiting, flag it */
                if ((0 == res) && (1 == srp->done) && (!srp->sg_io_owned))
-                       res = POLLIN | POLLRDNORM;
+                       res = EPOLLIN | EPOLLRDNORM;
                ++count;
        }
        read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
 
        if (atomic_read(&sdp->detaching))
-               res |= POLLHUP;
+               res |= EPOLLHUP;
        else if (!sfp->cmd_q) {
                if (0 == count)
-                       res |= POLLOUT | POLLWRNORM;
+                       res |= EPOLLOUT | EPOLLWRNORM;
        } else if (count < SG_MAX_QUEUE)
-               res |= POLLOUT | POLLWRNORM;
+               res |= EPOLLOUT | EPOLLWRNORM;
        SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp,
                                      "sg_poll: res=0x%x\n", (__force u32) res));
        return res;