200-linux-37.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --- a/src/drv_tapi_linux.c
  2. +++ b/src/drv_tapi_linux.c
  3. @@ -146,8 +146,13 @@ static ssize_t ifx_tapi_write(struct fil
  4. size_t count, loff_t * ppos);
  5. static ssize_t ifx_tapi_read(struct file * filp, char *buf,
  6. size_t length, loff_t * ppos);
  7. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
  8. static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
  9. unsigned int nCmd, unsigned long nArgument);
  10. +#else
  11. +static long ifx_tapi_ioctl(struct file *filp,
  12. + unsigned int nCmd, unsigned long nArgument);
  13. +#endif
  14. static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table);
  15. #ifdef CONFIG_PROC_FS
  16. @@ -231,7 +236,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
  17. IFX_char_t *pRegDrvName = IFX_NULL;
  18. IFX_int32_t ret = 0;
  19. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
  20. if (tapi_fops.ioctl == IFX_NULL)
  21. +#else
  22. + if (tapi_fops.unlocked_ioctl == IFX_NULL)
  23. +#endif
  24. {
  25. #ifdef MODULE
  26. tapi_fops.owner = THIS_MODULE;
  27. @@ -239,7 +248,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
  28. tapi_fops.read = ifx_tapi_read;
  29. tapi_fops.write = ifx_tapi_write;
  30. tapi_fops.poll = ifx_tapi_poll;
  31. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
  32. tapi_fops.ioctl = ifx_tapi_ioctl;
  33. +#else
  34. + tapi_fops.unlocked_ioctl = ifx_tapi_ioctl;
  35. +#endif
  36. tapi_fops.open = ifx_tapi_open;
  37. tapi_fops.release = ifx_tapi_release;
  38. }
  39. @@ -894,8 +907,13 @@ static IFX_uint32_t ifx_tapi_poll (struc
  40. - 0 and positive values - success
  41. - negative value - ioctl failed
  42. */
  43. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
  44. static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
  45. unsigned int nCmd, unsigned long nArg)
  46. +#else
  47. +static long ifx_tapi_ioctl(struct file *filp,
  48. + unsigned int nCmd, unsigned long nArg)
  49. +#endif
  50. {
  51. TAPI_FD_PRIV_DATA_t *pTapiPriv;
  52. IFX_TAPI_ioctlCtx_t ctx;
  53. --- a/src/lib/lib_fifo/lib_fifo.c
  54. +++ b/src/lib/lib_fifo/lib_fifo.c
  55. @@ -41,7 +41,7 @@
  56. #ifdef LINUX
  57. /* if linux/slab.h is not available, use the precessor linux/malloc.h */
  58. #include <linux/slab.h>
  59. -#elif VXWORKS
  60. +#elif defined(VXWORKS)
  61. #include <sys_drv_debug.h>
  62. #endif /* LINUX */