[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/apps/AccessPoint/kernel telos_ap.c, 1.6, 1.7

steve ayer ayer1 at users.sourceforge.net
Thu Jul 31 08:10:08 PDT 2008


Update of /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/AccessPoint/kernel
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30196

Modified Files:
	telos_ap.c 
Log Message:

linux kernel 2.6.26 moves tty_driver operations into a separate
structure; updates handle these cases near lines 400, 435, and 835
(write and flush_buffer are the ops).


Index: telos_ap.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/apps/AccessPoint/kernel/telos_ap.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** telos_ap.c	30 Jan 2008 20:01:18 -0000	1.6
--- telos_ap.c	31 Jul 2008 15:10:01 -0000	1.7
***************
*** 396,400 ****
  	 */
  	telos->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
! #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
          actual = telos->tty->driver->write(telos->tty, telos->xbuff, count);
  #else
--- 396,402 ----
  	 */
  	telos->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
! #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
! 	actual = telos->tty->driver->ops->write(telos->tty, telos->xbuff, count);
! #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
          actual = telos->tty->driver->write(telos->tty, telos->xbuff, count);
  #else
***************
*** 429,433 ****
  	}
  
! #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
          actual = tty->driver->write(tty, telos->xhead, telos->xleft);
  #else
--- 431,437 ----
  	}
  
! #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
!         actual = tty->driver->ops->write(tty, telos->xhead, telos->xleft);
! #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
          actual = tty->driver->write(tty, telos->xhead, telos->xleft);
  #else
***************
*** 841,846 ****
--- 845,856 ----
  	telos->pid     = current->pid;
  
+ 
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
+ 	if (tty->driver->ops->flush_buffer)
+ 		tty->driver->ops->flush_buffer(tty);
+ #else
  	if (tty->driver->flush_buffer)
  		tty->driver->flush_buffer(tty);
+ #endif
  	if (tty->ldisc.flush_buffer)
  		tty->ldisc.flush_buffer(tty);



More information about the Tinyos-contrib-commits mailing list