patch-2.1.23 linux/drivers/char/rtc.c
Next file: linux/drivers/char/selection.h
Previous file: linux/drivers/char/random.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Sat Jan 25 23:46:13 1997
- Orig file:
v2.1.22/linux/drivers/char/rtc.c
- Orig date:
Sun Dec 22 16:37:31 1996
diff -u --recursive --new-file v2.1.22/linux/drivers/char/rtc.c linux/drivers/char/rtc.c
@@ -75,8 +75,7 @@
static int rtc_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
-static int rtc_select(struct inode *inode, struct file *file,
- int sel_type, select_table *wait);
+static unsigned int rtc_poll(struct file *file, poll_table *wait);
void get_rtc_time (struct rtc_time *rtc_tm);
void get_rtc_alm_time (struct rtc_time *alm_tm);
@@ -492,14 +491,11 @@
rtc_status &= ~RTC_IS_OPEN;
}
-static int rtc_select(struct inode *inode, struct file *file,
- int sel_type, select_table *wait)
+static unsigned int rtc_poll(struct file *file, poll_table *wait)
{
- if (sel_type == SEL_IN) {
- if (rtc_irq_data != 0)
- return 1;
- select_wait(&rtc_wait, wait);
- }
+ poll_wait(&rtc_wait, wait);
+ if (rtc_irq_data != 0)
+ return POLLIN | POLLRDNORM;
return 0;
}
@@ -512,7 +508,7 @@
rtc_read,
NULL, /* No write */
NULL, /* No readdir */
- rtc_select,
+ rtc_poll,
rtc_ioctl,
NULL, /* No mmap */
rtc_open,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov