source: branches/backfire/package/ltq-tapi/patches/200-linux-37.patch @ 27547

Last change on this file since 27547 was 27547, checked in by blogic, 5 years ago

adds lantiq packages/drivers

File size: 3.5 KB
  • src/drv_tapi_linux.c

    a b  
    4747#include <linux/errno.h> 
    4848#include <asm/uaccess.h>               /* copy_from_user(), ... */ 
    4949#include <asm/byteorder.h> 
     50#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) 
    5051#include <linux/smp_lock.h>         /* lock_kernel() */ 
     52#endif 
    5153#include <asm/io.h> 
    5254 
    5355#ifdef LINUX_2_6 
     
    6567#else 
    6668   #include <linux/tqueue.h> 
    6769   #include <linux/sched.h> 
     70#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) 
    6871   #include <linux/smp_lock.h>         /* lock_kernel() */ 
     72#endif 
    6973#endif /* LINUX_2_6 */ 
    7074 
    7175#include "drv_tapi.h" 
     
    133137                              size_t count, loff_t * ppos); 
    134138static ssize_t ifx_tapi_read(struct file * filp, char *buf, 
    135139                              size_t length, loff_t * ppos); 
     140#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) 
    136141static int ifx_tapi_ioctl(struct inode *inode, struct file *filp, 
    137142                              unsigned int nCmd, unsigned long nArgument); 
     143#else 
     144static long ifx_tapi_ioctl(struct file *filp, 
     145                              unsigned int nCmd, unsigned long nArgument); 
     146#endif 
    138147static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table); 
    139148 
    140149#ifdef CONFIG_PROC_FS 
     
    218227   IFX_char_t   *pRegDrvName = IFX_NULL; 
    219228   IFX_int32_t ret = 0; 
    220229 
     230#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) 
    221231   if (tapi_fops.ioctl == IFX_NULL) 
     232#else 
     233   if (tapi_fops.unlocked_ioctl == IFX_NULL) 
     234#endif 
    222235   { 
    223236#ifdef MODULE 
    224237      tapi_fops.owner =    THIS_MODULE; 
     
    226239      tapi_fops.read =     ifx_tapi_read; 
    227240      tapi_fops.write =    ifx_tapi_write; 
    228241      tapi_fops.poll =     ifx_tapi_poll; 
     242#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) 
    229243      tapi_fops.ioctl =    ifx_tapi_ioctl; 
     244#else 
     245      tapi_fops.unlocked_ioctl =    ifx_tapi_ioctl; 
     246#endif 
    230247      tapi_fops.open =     ifx_tapi_open; 
    231248      tapi_fops.release =  ifx_tapi_release; 
    232249   } 
     
    881898   - 0 and positive values - success 
    882899   - negative value - ioctl failed 
    883900*/ 
     901#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) 
    884902static int ifx_tapi_ioctl(struct inode *inode, struct file *filp, 
    885903                          unsigned int nCmd, unsigned long nArg) 
     904#else 
     905static long ifx_tapi_ioctl(struct file *filp, 
     906                          unsigned int nCmd, unsigned long nArg) 
     907#endif 
    886908{ 
    887909   TAPI_FD_PRIV_DATA_t *pTapiPriv; 
    888910   IFX_TAPI_ioctlCtx_t  ctx; 
     
    37213743            kernel lock (lock_kernel()). The lock must be 
    37223744            grabbed before changing the terminate 
    37233745            flag and released after the down() call. */ 
    3724          lock_kernel(); 
     3746#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) 
     3747         lock_kernel(); 
     3748#endif 
    37253749         mb(); 
    37263750#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) 
    37273751         kill_proc(pThrCntrl->tid, SIGKILL, 1); 
     
    37293753         kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1); 
    37303754#endif 
    37313755         /* release the big kernel lock */ 
     3756#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) 
    37323757         unlock_kernel(); 
    3733          wait_for_completion (&pThrCntrl->thrCompletion); 
     3758#endif 
     3759         wait_for_completion (&pThrCntrl->thrCompletion); 
    37343760 
    37353761#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) 
    37363762         /* Now we are sure the thread is in zombie state. 
  • src/lib/lib_fifo/lib_fifo.c

    a b  
    4141#ifdef LINUX 
    4242/* if linux/slab.h is not available, use the precessor linux/malloc.h */ 
    4343#include <linux/slab.h> 
    44 #elif VXWORKS 
     44#elif defined(VXWORKS) 
    4545#include <sys_drv_debug.h> 
    4646#endif /* LINUX */ 
    4747 
Note: See TracBrowser for help on using the repository browser.