/* * si470x_fops_poll - poll RDS data */ static unsigned int si470x_fops_poll(struct file *file, struct poll_table_struct *pts) { struct si470x_device *radio = video_drvdata(file); unsigned long req_events = poll_requested_events(pts); int retval = v4l2_ctrl_poll(file, pts); if (req_events & (POLLIN | POLLRDNORM)) { /* switch on rds reception */ if ((radio->registers[SYSCONFIG1] & SYSCONFIG1_RDS) == 0) si470x_rds_on(radio); poll_wait(file, &radio->read_queue, pts); if (radio->rd_index != radio->wr_index) retval |= POLLIN | POLLRDNORM; } return retval; }
unsigned int vivid_radio_rx_poll(struct file *file, struct poll_table_struct *wait) { return POLLIN | POLLRDNORM | v4l2_ctrl_poll(file, wait); }
unsigned int vivid_radio_tx_poll(struct file *file, struct poll_table_struct *wait) { return POLLOUT | POLLWRNORM | v4l2_ctrl_poll(file, wait); }