001-pci-mem-Fix-3.8-build.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. From 8a0f5890019bf43f4bc95ef0754b062ddfcfa9cd Mon Sep 17 00:00:00 2001
  2. From: Oliver Winker <oliver@oli1170.net>
  3. Date: Sun, 10 Mar 2013 21:04:23 +0100
  4. Subject: [PATCH 1/3] pci, mem: Fix 3.8 build
  5. __devexit and __devinit not used anymore in 3.8
  6. Signed-off-by: Reinhard Karcher <reinhard.karcher@gmx.net>
  7. Signed-off-by: Oliver Winker <oliver@oli1170.net>
  8. ---
  9. mem.c | 13 ++++++++++++-
  10. pci.c | 26 +++++++++++++++++++++++++-
  11. 2 files changed, 37 insertions(+), 2 deletions(-)
  12. --- a/mem.c
  13. +++ b/mem.c
  14. @@ -2216,7 +2216,11 @@ int acx100mem_ioctl_set_phy_amp_bias(str
  15. * ==================================================
  16. */
  17. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
  18. static int __devinit acxmem_probe(struct platform_device *pdev)
  19. +#else
  20. +static int acxmem_probe(struct platform_device *pdev)
  21. +#endif
  22. {
  23. acx_device_t *adev = NULL;
  24. const char *chip_name;
  25. @@ -2392,7 +2396,11 @@ static int __devinit acxmem_probe(struct
  26. * pdev - ptr to PCI device structure containing info about pci
  27. * configuration
  28. */
  29. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
  30. static int __devexit acxmem_remove(struct platform_device *pdev)
  31. +#else
  32. +static int acxmem_remove(struct platform_device *pdev)
  33. +#endif
  34. {
  35. struct ieee80211_hw *hw = (struct ieee80211_hw *)
  36. platform_get_drvdata(pdev);
  37. @@ -2594,8 +2602,11 @@ static struct platform_driver acxmem_dri
  38. .name = "acx-mem",
  39. },
  40. .probe = acxmem_probe,
  41. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
  42. .remove = __devexit_p(acxmem_remove),
  43. -
  44. +#else
  45. + .remove = acxmem_remove,
  46. +#endif
  47. #ifdef CONFIG_PM
  48. .suspend = acxmem_e_suspend,
  49. .resume = acxmem_e_resume
  50. --- a/pci.c
  51. +++ b/pci.c
  52. @@ -1039,7 +1039,11 @@ int acx100pci_ioctl_set_phy_amp_bias(str
  53. * id - ptr to the device id entry that matched this device
  54. */
  55. #ifdef CONFIG_PCI
  56. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
  57. static int __devinit acxpci_probe(struct pci_dev *pdev,
  58. +#else
  59. +static int acxpci_probe(struct pci_dev *pdev,
  60. +#endif
  61. const struct pci_device_id *id)
  62. {
  63. unsigned long mem_region1 = 0;
  64. @@ -1292,7 +1296,11 @@ static int __devinit acxpci_probe(struct
  65. *
  66. * pdev - ptr to PCI device structure containing info about pci configuration
  67. */
  68. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
  69. static void __devexit acxpci_remove(struct pci_dev *pdev)
  70. +#else
  71. +static void acxpci_remove(struct pci_dev *pdev)
  72. +#endif
  73. {
  74. struct ieee80211_hw *hw
  75. = (struct ieee80211_hw *) pci_get_drvdata(pdev);
  76. @@ -1505,7 +1513,11 @@ static struct pci_driver acxpci_driver =
  77. .name = "acx_pci",
  78. .id_table = acxpci_id_tbl,
  79. .probe = acxpci_probe,
  80. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
  81. .remove = __devexit_p(acxpci_remove),
  82. +#else
  83. + .remove = acxpci_remove,
  84. +#endif
  85. #ifdef CONFIG_PM
  86. .suspend = acxpci_e_suspend,
  87. .resume = acxpci_e_resume
  88. @@ -1603,8 +1615,12 @@ static struct vlynq_device_id acx_vlynq_
  89. };
  90. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
  91. static __devinit int vlynq_probe(struct vlynq_device *vdev,
  92. - struct vlynq_device_id *id)
  93. +#else
  94. +static int vlynq_probe(struct vlynq_device *vdev,
  95. +#endif
  96. + struct vlynq_device_id *id)
  97. {
  98. int result = -EIO, i;
  99. u32 addr;
  100. @@ -1785,7 +1801,11 @@ static __devinit int vlynq_probe(struct
  101. return result;
  102. }
  103. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
  104. static __devexit void vlynq_remove(struct vlynq_device *vdev)
  105. +#else
  106. +static void vlynq_remove(struct vlynq_device *vdev)
  107. +#endif
  108. {
  109. struct ieee80211_hw *hw = vlynq_get_drvdata(vdev);
  110. acx_device_t *adev = hw2adev(hw);
  111. @@ -1851,7 +1871,11 @@ static struct vlynq_driver acxvlynq_driv
  112. .name = "acx_vlynq",
  113. .id_table = acx_vlynq_id,
  114. .probe = vlynq_probe,
  115. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
  116. .remove = __devexit_p(vlynq_remove),
  117. +#else
  118. + .remove = vlynq_remove,
  119. +#endif
  120. };
  121. #endif /* CONFIG_VLYNQ */