mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
open-vm-tools: add linux-3.8 support patch
This commit is contained in:
parent
1e1c6f10c4
commit
4835beacc0
@ -0,0 +1,60 @@
|
||||
--- open-vm-tools-2012.05.21-724730/modules/linux/vmci/linux/driver.c~ 2012-05-22 22:12:52.000000000 +0200
|
||||
+++ open-vm-tools-2012.05.21-724730/modules/linux/vmci/linux/driver.c 2013-02-21 01:22:04.836684885 +0100
|
||||
@@ -128,7 +128,11 @@ static struct pci_driver vmci_driver = {
|
||||
.name = VMCI_DEVICE_NAME,
|
||||
.id_table = vmci_ids,
|
||||
.probe = vmci_probe_device,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
|
||||
.remove = __devexit_p(vmci_remove_device),
|
||||
+#else
|
||||
+ .remove = vmci_remove_device,
|
||||
+#endif
|
||||
};
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
|
||||
@@ -1747,7 +1751,10 @@ vmci_enable_msix(struct pci_dev *pdev) /
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
-static int __devinit
|
||||
+static int
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
|
||||
+__devinit
|
||||
+#endif
|
||||
vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device
|
||||
const struct pci_device_id *id) // IN: matching device ID
|
||||
{
|
||||
@@ -1975,7 +1982,10 @@ vmci_probe_device(struct pci_dev *pdev,
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
-static void __devexit
|
||||
+static void
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
|
||||
+__devexit
|
||||
+#endif
|
||||
vmci_remove_device(struct pci_dev* pdev)
|
||||
{
|
||||
struct vmci_device *dev = pci_get_drvdata(pdev);
|
||||
--- open-vm-tools-2012.05.21-724730/modules/linux/shared/compat_mm.h 2013-01-17 17:58:53.090333002 +0100
|
||||
+++ open-vm-tools-2012.05.21-724730/modules/linux/shared/compat_mm.h 2013-01-17 18:18:25.274280444 +0100
|
||||
@@ -99,8 +99,18 @@ static inline struct page * alloc_pages(
|
||||
vmtruncate(inode, size); \
|
||||
result; \
|
||||
})
|
||||
-#else
|
||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
|
||||
#define compat_vmtruncate(inode, size) vmtruncate(inode, size)
|
||||
+#else
|
||||
+#define compat_vmtruncate(inode, size) \
|
||||
+({ \
|
||||
+ result = inode_newsize_ok(inode, size); \
|
||||
+ if (!result) \
|
||||
+ { \
|
||||
+ truncate_setsize(inode, size); \
|
||||
+ } \
|
||||
+ result; \
|
||||
+})
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user