Changeset 36471 in vbox
- Timestamp:
- Mar 30, 2011 9:41:27 AM (14 years ago)
- Location:
- trunk/src/VBox/Additions/linux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/drm/vboxvideo_drm.c
r35662 r36471 67 67 68 68 static struct pci_device_id pciidlist[] = { 69 69 vboxvideo_PCI_IDS 70 70 }; 71 71 … … 73 73 { 74 74 # if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 28) 75 75 return drm_vblank_init(dev, 1); 76 76 #else 77 77 return 0; … … 79 79 } 80 80 81 static struct drm_driver driver = { 82 /* .driver_features = DRIVER_USE_MTRR, */ 83 .load = vboxvideo_driver_load, 84 .reclaim_buffers = drm_core_reclaim_buffers, 85 /* As of Linux 2.65.37, always the internal functions are used. */ 81 static struct drm_driver driver = 82 { 83 /* .driver_features = DRIVER_USE_MTRR, */ 84 .load = vboxvideo_driver_load, 85 .reclaim_buffers = drm_core_reclaim_buffers, 86 /* As of Linux 2.65.37, always the internal functions are used. */ 86 87 #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 37) 87 88 88 .get_map_ofs = drm_core_get_map_ofs, 89 .get_reg_ofs = drm_core_get_reg_ofs, 89 90 #endif 90 .fops = { 91 .owner = THIS_MODULE, 92 .open = drm_open, 93 .release = drm_release, 94 /* This was changed with Linux 2.6.33 but Fedora backported this 95 * change to their 2.6.32 kernel. */ 91 .fops = 92 { 93 .owner = THIS_MODULE, 94 .open = drm_open, 95 .release = drm_release, 96 /* This was changed with Linux 2.6.33 but Fedora backported this 97 * change to their 2.6.32 kernel. */ 96 98 #if defined(DRM_UNLOCKED) || LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 33) 97 99 .unlocked_ioctl = drm_ioctl, 98 100 #else 99 101 .ioctl = drm_ioctl, 100 102 #endif 101 .mmap = drm_mmap, 102 .poll = drm_poll, 103 .fasync = drm_fasync, 104 }, 105 .pci_driver = { 106 .name = DRIVER_NAME, 107 .id_table = pciidlist, 108 }, 103 .mmap = drm_mmap, 104 .poll = drm_poll, 105 .fasync = drm_fasync, 106 }, 107 #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39) 108 .pci_driver = 109 { 110 .name = DRIVER_NAME, 111 .id_table = pciidlist, 112 }, 113 #endif 114 .name = DRIVER_NAME, 115 .desc = DRIVER_DESC, 116 .date = DRIVER_DATE, 117 .major = DRIVER_MAJOR, 118 .minor = DRIVER_MINOR, 119 .patchlevel = DRIVER_PATCHLEVEL, 120 }; 109 121 110 .name = DRIVER_NAME, 111 .desc = DRIVER_DESC, 112 .date = DRIVER_DATE, 113 .major = DRIVER_MAJOR, 114 .minor = DRIVER_MINOR, 115 .patchlevel = DRIVER_PATCHLEVEL, 122 #if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 39) 123 static struct pci_driver pci_driver = 124 { 125 .name = DRIVER_NAME, 126 .id_table = pciidlist, 116 127 }; 128 #endif 117 129 118 130 static int __init vboxvideo_init(void) 119 131 { 120 return drm_init(&driver); 132 #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39) 133 return drm_init(&driver); 134 #else 135 return drm_pci_init(&driver, &pci_driver); 136 #endif 121 137 } 122 138 123 139 static void __exit vboxvideo_exit(void) 124 140 { 125 drm_exit(&driver); 141 #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39) 142 drm_exit(&driver); 143 #else 144 drm_pci_exit(&driver, &pci_driver); 145 #endif 126 146 } 127 147 -
trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c
r33994 r36471 447 447 } 448 448 449 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)449 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) 450 450 static struct super_block *sf_get_sb(struct file_system_type *fs_type, int flags, 451 const char *dev_name, void *data)451 const char *dev_name, void *data) 452 452 { 453 453 TRACE(); 454 454 return get_sb_nodev(fs_type, flags, data, sf_read_super_26); 455 455 } 456 # else456 # elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) 457 457 static int sf_get_sb(struct file_system_type *fs_type, int flags, 458 458 const char *dev_name, void *data, struct vfsmount *mnt) … … 461 461 return get_sb_nodev(fs_type, flags, data, sf_read_super_26, mnt); 462 462 } 463 #endif 463 # else 464 static struct dentry *sf_mount(struct file_system_type *fs_type, int flags, 465 const char *dev_name, void *data) 466 { 467 TRACE(); 468 return mount_nodev(fs_type, flags, data, sf_read_super_26); 469 } 470 # endif 464 471 465 472 static struct file_system_type vboxsf_fs_type = … … 467 474 .owner = THIS_MODULE, 468 475 .name = "vboxsf", 476 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) 469 477 .get_sb = sf_get_sb, 478 # else 479 .mount = sf_mount, 480 # endif 470 481 .kill_sb = kill_anon_super 471 482 };
Note:
See TracChangeset
for help on using the changeset viewer.