*** mcs9865_old.c	2008-05-16 08:40:42.000000000 +0200
--- mcs9865.c	2010-01-31 15:08:38.000000000 +0100
***************
*** 619,625 ****
  static _INLINE_ void receive_chars(struct uart_9865_port *up, u8 *status, struct pt_regs *regs)
  #endif
  {
! 	struct tty_struct *tty = up->port.info->tty;
  	u8 ch,lsr = *status;
  	int max_count = 256;
  	unsigned int flag;
--- 619,629 ----
  static _INLINE_ void receive_chars(struct uart_9865_port *up, u8 *status, struct pt_regs *regs)
  #endif
  {
! #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
! 	struct tty_struct *tty = up->port.info->port.tty;
! #else
!   struct tty_struct *tty = up->port.info->tty;
! #endif
  	u8 ch,lsr = *status;
  	int max_count = 256;
  	unsigned int flag;
***************
*** 849,855 ****
  //Helper function to do the necessary action upon the successful completion of data receive in DMA mode
  static void receive_chars_dma_done(struct uart_9865_port * up, int iirg)
  {
! 	struct tty_struct *tty = up->port.info->tty;
  	int i,rxdma_done=0;
  	u16 received_bytes;
  	u32 need2recv;
--- 853,863 ----
  //Helper function to do the necessary action upon the successful completion of data receive in DMA mode
  static void receive_chars_dma_done(struct uart_9865_port * up, int iirg)
  {
! #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
!   struct tty_struct *tty = up->port.info->port.tty;
! #else
!   struct tty_struct *tty = up->port.info->tty;
! #endif
  	int i,rxdma_done=0;
  	u16 received_bytes;
  	u32 need2recv;
***************
*** 954,960 ****
  #endif
  {
  	u8 status = serial_in(up, UART_LSR);
! 	struct tty_struct *tty=up->port.info->tty;	
  
  	DEBUG("In %s ---------------------------------------START\n",__FUNCTION__);
  	DEBUG("UART_LSR = %x...", status);
--- 962,972 ----
  #endif
  {
  	u8 status = serial_in(up, UART_LSR);
! #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
!   struct tty_struct *tty = up->port.info->port.tty;
! #else
!   struct tty_struct *tty = up->port.info->tty;
! #endif
  
  	DEBUG("In %s ---------------------------------------START\n",__FUNCTION__);
  	DEBUG("UART_LSR = %x...", status);
***************
*** 2065,2071 ****
  	}	
  
  	//Register a ISR
! 	if ((retval = request_irq(dev->irq, serial9865_interrupt,SA_SHIRQ,"mcs9865-serial",&serial9865_ports[retval]))) 
  		  goto disable;
  
  	DEBUG("In %s ---------------------------------------END\n",__FUNCTION__);
--- 2077,2087 ----
  	}	
  
  	//Register a ISR
! #if !defined(SA_SHIRQ)
!   if ((retval = request_irq(dev->irq, serial9865_interrupt,IRQF_SHARED,"mcs9865-serial",&serial9865_ports[retval])))
! #else
! 	if ((retval = request_irq(dev->irq, serial9865_interrupt,SA_SHIRQ,"mcs9865-serial",&serial9865_ports[retval])))
! #endif
  		  goto disable;
  
  	DEBUG("In %s ---------------------------------------END\n",__FUNCTION__);
