130-linux3.8.patch 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  2. ===================================================================
  3. --- drv_dsl_cpe_api-3.24.4.4.orig/src/common/drv_dsl_cpe_os_linux.c 2013-03-14 11:44:50.318326078 +0100
  4. +++ drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c 2013-03-14 11:46:08.562329425 +0100
  5. @@ -11,6 +11,7 @@
  6. #ifdef __LINUX__
  7. #define DSL_INTERN
  8. +#include <linux/kthread.h>
  9. #include <linux/device.h>
  10. #include <linux/platform_device.h>
  11. @@ -40,7 +41,7 @@
  12. static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile,
  13. DSL_uint_t nCommand, unsigned long nArg);
  14. #else
  15. -static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
  16. +static long DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
  17. DSL_uint_t nCommand, unsigned long nArg);
  18. #endif
  19. static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
  20. @@ -184,7 +185,7 @@
  21. DSL_uint_t nCommand,
  22. unsigned long nArg)
  23. #else
  24. -static DSL_int_t DSL_DRV_Ioctls(
  25. +static long DSL_DRV_Ioctls(
  26. DSL_DRV_file_t * pFile,
  27. DSL_uint_t nCommand,
  28. unsigned long nArg)
  29. @@ -521,9 +522,9 @@
  30. - IFX_SUCCESS on success
  31. - IFX_ERROR on error
  32. */
  33. -DSL_DRV_STATIC DSL_int32_t DSL_DRV_KernelThreadStartup(
  34. - DSL_DRV_ThreadCtrl_t *pThrCntrl)
  35. +static int DSL_DRV_KernelThreadStartup(void *data)
  36. {
  37. + DSL_DRV_ThreadCtrl_t *pThrCntrl = (DSL_DRV_ThreadCtrl_t*) data;
  38. DSL_int32_t retVal = -1;
  39. #ifndef _lint
  40. @@ -546,30 +547,6 @@
  41. (DSL_NULL, "ENTER - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
  42. pThrCntrl->thrParams.pName));
  43. - /* do LINUX specific setup */
  44. -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
  45. - daemonize();
  46. - reparent_to_init();
  47. -
  48. - /* lock the kernel. A new kernel thread starts without
  49. - the big kernel lock, regardless of the lock state
  50. - of the creator (the lock level is *not* inheritated)
  51. - */
  52. - lock_kernel();
  53. -
  54. - /* Don't care about any signals. */
  55. - siginitsetinv(&current->blocked, 0);
  56. -
  57. - /* set name of this process */
  58. - strcpy(kthread->comm, pThrCntrl->thrParams.pName);
  59. -
  60. - /* let others run */
  61. - unlock_kernel();
  62. -#else
  63. - daemonize(pThrCntrl->thrParams.pName);
  64. -
  65. -#endif
  66. -
  67. /*DSL_DRV_ThreadPriorityModify(pThrCntrl->nPriority);*/
  68. pThrCntrl->thrParams.bRunning = 1;
  69. @@ -639,9 +616,7 @@
  70. init_completion(&pThrCntrl->thrCompletion);
  71. /* start kernel thread via the wrapper function */
  72. - pThrCntrl->pid = kernel_thread( (DSL_DRV_KERNEL_THREAD_StartRoutine)DSL_DRV_KernelThreadStartup,
  73. - (void *)pThrCntrl,
  74. - DSL_DRV_DRV_THREAD_OPTIONS);
  75. + pThrCntrl->pid = kthread_run(DSL_DRV_KernelThreadStartup, (void *)pThrCntrl, pThrCntrl->thrParams.pName);
  76. pThrCntrl->bValid = DSL_TRUE;
  77. @@ -1064,12 +1039,12 @@
  78. #endif
  79. /* Entry point of driver */
  80. -static int __devinit ltq_adsl_probe(struct platform_device *pdev)
  81. +static int ltq_adsl_probe(struct platform_device *pdev)
  82. {
  83. struct class *dsl_class;
  84. DSL_int_t i;
  85. - printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
  86. + printk("Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
  87. &(dsl_cpe_api_version[4]));
  88. DSL_DRV_MemSet( ifxDevices, 0, sizeof(DSL_devCtx_t) * DSL_DRV_MAX_DEVICE_NUMBER );
  89. @@ -1118,7 +1093,7 @@
  90. return 0;
  91. }
  92. -static int __devexit ltq_adsl_remove(struct platform_device *pdev)
  93. +static int ltq_adsl_remove(struct platform_device *pdev)
  94. {
  95. printk("Module will be unloaded"DSL_DRV_CRLF);
  96. @@ -1163,7 +1138,7 @@
  97. static struct platform_driver ltq_adsl_driver = {
  98. .probe = ltq_adsl_probe,
  99. - .remove = __devexit_p(ltq_adsl_remove),
  100. + .remove = ltq_adsl_remove,
  101. .driver = {
  102. .name = "adsl",
  103. .owner = THIS_MODULE,
  104. Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_lint_map.h
  105. ===================================================================
  106. --- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_lint_map.h 2009-02-24 21:44:54.000000000 +0100
  107. +++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_lint_map.h 2013-03-14 11:44:50.330326079 +0100
  108. @@ -247,7 +247,7 @@
  109. DSL_DRV_ThreadFunction_t pThrFct;
  110. /** Kernel thread process ID */
  111. - DSL_int32_t pid;
  112. + struct task_struct *pid;
  113. /** requested kernel thread priority */
  114. DSL_int32_t nPriority;
  115. Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h
  116. ===================================================================
  117. --- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_linux.h 2013-03-14 11:44:50.298326077 +0100
  118. +++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h 2013-03-14 11:44:50.330326079 +0100
  119. @@ -288,7 +288,7 @@
  120. DSL_DRV_ThreadFunction_t pThrFct;
  121. /** Kernel thread process ID */
  122. - DSL_int32_t pid;
  123. + struct task_struct *pid;
  124. /** requested kernel thread priority */
  125. DSL_int32_t nPriority;