Source
258
258
259
259
static __poll_t phantom_poll(struct file *file, poll_table *wait)
260
260
{
261
261
struct phantom_device *dev = file->private_data;
262
262
__poll_t mask = 0;
263
263
264
264
pr_debug("phantom_poll: %d\n", atomic_read(&dev->counter));
265
265
poll_wait(file, &dev->wait, wait);
266
266
267
267
if (!(dev->status & PHB_RUNNING))
268
-
mask = POLLERR;
268
+
mask = EPOLLERR;
269
269
else if (atomic_read(&dev->counter))
270
-
mask = POLLIN | POLLRDNORM;
270
+
mask = EPOLLIN | EPOLLRDNORM;
271
271
272
272
pr_debug("phantom_poll end: %x/%d\n", mask, atomic_read(&dev->counter));
273
273
274
274
return mask;
275
275
}
276
276
277
277
static const struct file_operations phantom_file_ops = {
278
278
.open = phantom_open,
279
279
.release = phantom_release,
280
280
.unlocked_ioctl = phantom_ioctl,