open-vm-tools/open-vm-tools-kernel-3.8.patch

53 lines
2.0 KiB
Diff

--- a/modules/linux/shared/compat_mm.h
+++ b/modules/linux/shared/compat_mm.h
@@ -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
--- a/modules/linux/vmci/linux/driver.c
+++ b/modules/linux/vmci/linux/driver.c
@@ -124,7 +124,7 @@ static struct pci_driver vmci_driver = {
.name = "vmci",
.id_table = vmci_ids,
.probe = vmci_probe_device,
- .remove = __devexit_p(vmci_remove_device),
+ .remove = vmci_remove_device,
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
@@ -1750,7 +1750,7 @@ vmci_enable_msix(struct pci_dev *pdev) /
*-----------------------------------------------------------------------------
*/
-static int __devinit
+static int
vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device
const struct pci_device_id *id) // IN: matching device ID
{
@@ -1978,7 +1978,7 @@ vmci_probe_device(struct pci_dev *pdev,
*-----------------------------------------------------------------------------
*/
-static void __devexit
+static void
vmci_remove_device(struct pci_dev* pdev)
{
struct vmci_device *dev = pci_get_drvdata(pdev);