source: branches/backfire/package/ltq-dsl/patches/100-dsl_compat.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.3 KB
  • src/include/drv_dsl_cpe_device_danube.h

    a b  
    2424   #include "drv_dsl_cpe_simulator_danube.h" 
    2525#else 
    2626/* Include for the low level driver interface header file */ 
    27 #include "asm/ifx/ifx_mei_bsp.h" 
     27#include "mei/ifxmips_mei_interface.h" 
    2828#endif /* defined(DSL_CPE_SIMULATOR_DRIVER) && defined(WIN32)*/ 
    2929 
    3030#define DSL_MAX_LINE_NUMBER 1 
  • src/common/drv_dsl_cpe_os_linux.c

    a b  
    1111#ifdef __LINUX__ 
    1212 
    1313#define DSL_INTERN 
     14#include <linux/device.h> 
    1415 
    1516#include "drv_dsl_cpe_api.h" 
    1617#include "drv_dsl_cpe_api_ioctl.h" 
     
    3435static DSL_ssize_t DSL_DRV_Write(DSL_DRV_file_t *pFile, const DSL_char_t * pBuf, 
    3536                                 DSL_DRV_size_t nSize, DSL_DRV_offset_t * pLoff); 
    3637 
     38#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) 
    3739static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile, 
    3840                         DSL_uint_t nCommand, unsigned long nArg); 
    39  
     41#else 
     42static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_file_t * pFile, 
     43                         DSL_uint_t nCommand, unsigned long nArg); 
     44#endif 
    4045static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil); 
    4146 
    4247static int DSL_DRV_Release(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil); 
     
    7277   open:    DSL_DRV_Open, 
    7378   release: DSL_DRV_Release, 
    7479   write:   DSL_DRV_Write, 
     80#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) 
    7581   ioctl:   DSL_DRV_Ioctls, 
     82#else 
     83   unlocked_ioctl:   DSL_DRV_Ioctls, 
     84#endif 
    7685   poll:    DSL_DRV_Poll 
    7786}; 
    7887#else 
     
    168177   \return  Success or failure. 
    169178   \ingroup Internal 
    170179*/ 
     180#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) 
    171181static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, 
    172182   DSL_DRV_file_t * pFile, 
    173183   DSL_uint_t nCommand, 
    174184   unsigned long nArg) 
     185#else 
     186static DSL_int_t DSL_DRV_Ioctls( 
     187   DSL_DRV_file_t * pFile, 
     188   DSL_uint_t nCommand, 
     189   unsigned long nArg) 
     190#endif 
    175191{ 
    176192   DSL_int_t nErr=0; 
    177193   DSL_boolean_t bIsInKernel; 
     
    216232         } 
    217233      } 
    218234   } 
    219  
    220    if (pINode == DSL_NULL) 
    221    { 
    222       bIsInKernel = DSL_TRUE; 
    223    } 
    224    else 
    225    { 
    226       bIsInKernel = DSL_FALSE; 
    227    } 
    228  
     235   bIsInKernel = DSL_FALSE; 
    229236   if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) || 
    230237        (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) || 
    231238        (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_PM) || 
     
    10581065/* Entry point of driver */ 
    10591066int __init DSL_ModuleInit(void) 
    10601067{ 
     1068   struct class *dsl_class; 
    10611069   DSL_int_t i; 
    10621070 
    10631071   printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF, 
     
    11041112   } 
    11051113 
    11061114   DSL_DRV_DevNodeInit(); 
    1107  
     1115   dsl_class = class_create(THIS_MODULE, "dsl_cpe_api"); 
     1116   device_create(dsl_class, NULL, MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0), NULL, "dsl_cpe_api"); 
    11081117   return 0; 
    11091118} 
    11101119 
  • src/include/drv_dsl_cpe_os_linux.h

    a b  
    1717#endif 
    1818 
    1919#include <asm/ioctl.h> 
    20 #include <linux/autoconf.h> 
     20#include <generated/autoconf.h> 
    2121#include <linux/module.h> 
    2222#include <linux/kernel.h> 
    2323#include <linux/init.h> 
    2424#include <linux/ctype.h> 
    2525#include <linux/version.h> 
    2626#include <linux/spinlock.h> 
    27  
     27#include <linux/sched.h> 
    2828 
    2929#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) 
    30    #include <linux/utsrelease.h> 
     30   #include <generated/utsrelease.h> 
    3131#endif 
    3232 
    3333#include <linux/types.h> 
Note: See TracBrowser for help on using the repository browser.