Skip to content

Instantly share code, notes, and snippets.

@cosmo0920
Last active February 9, 2016 03:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosmo0920/5058531 to your computer and use it in GitHub Desktop.
Save cosmo0920/5058531 to your computer and use it in GitHub Desktop.
Linux 3.8-rc1以降ではCONFIG_HOTPLUGがyになって__devexit_pとかのhotplug関連マクロが使えなくなったらしい。VMWareでは対応していなくてコンパイルエラーになるよ☆
--- vmci-only/linux/driver.c 2012-11-01 16:22:03.000000000 +0900
+++ vmci-only/linux/driver.c.edited 2013-03-01 04:21:08.402942111 +0900
@@ -124,7 +124,11 @@ static struct pci_driver vmci_driver = {
.name = "vmci",
.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)
@@ -1750,7 +1754,11 @@ vmci_enable_msix(struct pci_dev *pdev) /
*-----------------------------------------------------------------------------
*/
-static int __devinit
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+ static int __devinit
+#else
+ static int
+#endif
vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device
const struct pci_device_id *id) // IN: matching device ID
{
@@ -1978,7 +1986,11 @@ vmci_probe_device(struct pci_dev *pdev,
*-----------------------------------------------------------------------------
*/
-static void __devexit
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+ static void __devexit
+#else
+ static void
+#endif
vmci_remove_device(struct pci_dev* pdev)
{
struct vmci_device *dev = pci_get_drvdata(pdev);
PATCHFILE=$1
cd /usr/lib/vmware/modules/source
tar -xf vmci.tar
cd vmci-only
patch -p1 < ${PATCHFILE}
cd ..
tar -cf vmci.tar vmci-only/
#出典:http://communities.vmware.com/thread/432897
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment