[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/apps/AccessPoint/kernel telos_ap.c, 1.7, 1.8
steve ayer
ayer1 at users.sourceforge.net
Tue Oct 21 09:48:11 PDT 2008
Update of /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/AccessPoint/kernel
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8237
Modified Files:
telos_ap.c
Log Message:
added two updates for kernels beginning with 2.6.27, which breaks tty_ldisc
routines out to a separate struct tty_ldisc_ops, referenced from a
field in struct tty_ldisc: reference to flush_buffer around line 856, and
the def of telos_ldisc around line 1120.
Index: telos_ap.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/AccessPoint/kernel/telos_ap.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** telos_ap.c 31 Jul 2008 15:10:01 -0000 1.7
--- telos_ap.c 21 Oct 2008 16:48:09 -0000 1.8
***************
*** 853,858 ****
--- 853,864 ----
tty->driver->flush_buffer(tty);
#endif
+
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
+ if (tty->ldisc.ops->flush_buffer)
+ tty->ldisc.ops->flush_buffer(tty);
+ #else
if (tty->ldisc.flush_buffer)
tty->ldisc.flush_buffer(tty);
+ #endif
if (!test_bit(TELOSF_INUSE, &telos->flags)) {
***************
*** 1118,1122 ****
}
! static struct tty_ldisc telos_ldisc = {
.owner = THIS_MODULE,
.magic = TTY_LDISC_MAGIC,
--- 1124,1130 ----
}
! #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
! #warning "using bleeding kernel"
! static struct tty_ldisc_ops telos_ldisc = {
.owner = THIS_MODULE,
.magic = TTY_LDISC_MAGIC,
***************
*** 1130,1133 ****
--- 1138,1157 ----
.poll = telos_ap_poll,
.receive_buf = telos_ap_receive_buf,
+ .write_wakeup = telos_ap_write_wakeup,
+ };
+ #else
+ static struct tty_ldisc telos_ldisc = {
+ .owner = THIS_MODULE,
+ .magic = TTY_LDISC_MAGIC,
+ .name = "telos_ap",
+ .open = telos_ap_open,
+ .close = telos_ap_close,
+ .flush_buffer = telos_ap_flush_buffer,
+ .chars_in_buffer = telos_ap_chars_in_buffer,
+ .read = telos_ap_read,
+ .ioctl = telos_ap_ioctl,
+ .poll = telos_ap_poll,
+ .receive_buf = telos_ap_receive_buf,
+
#ifdef KERNEL_2_6_15_OR_LESS
.receive_room = telos_ap_receive_room,
***************
*** 1135,1138 ****
--- 1159,1163 ----
.write_wakeup = telos_ap_write_wakeup,
};
+ #endif
static int __init telos_ap_init(void)
More information about the Tinyos-contrib-commits
mailing list