1
Description: Fix build failure with kernel 2.6.39-rc1.
2
Origin: upstream, http://www.virtualbox.org/changeset/36471
4
Index: trunk/src/VBox/Additions/linux/drm/vboxvideo_drm.c
5
===================================================================
6
--- trunk/src/VBox/Additions/linux/drm/vboxvideo_drm.c (revision 35662)
7
+++ trunk/src/VBox/Additions/linux/drm/vboxvideo_drm.c (revision 36471)
10
static struct pci_device_id pciidlist[] = {
17
# if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 28)
18
- return drm_vblank_init(dev, 1);
19
+ return drm_vblank_init(dev, 1);
25
-static struct drm_driver driver = {
26
- /* .driver_features = DRIVER_USE_MTRR, */
27
- .load = vboxvideo_driver_load,
28
- .reclaim_buffers = drm_core_reclaim_buffers,
29
- /* As of Linux 2.65.37, always the internal functions are used. */
30
+static struct drm_driver driver =
32
+ /* .driver_features = DRIVER_USE_MTRR, */
33
+ .load = vboxvideo_driver_load,
34
+ .reclaim_buffers = drm_core_reclaim_buffers,
35
+ /* As of Linux 2.65.37, always the internal functions are used. */
36
#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 37)
37
- .get_map_ofs = drm_core_get_map_ofs,
38
- .get_reg_ofs = drm_core_get_reg_ofs,
39
+ .get_map_ofs = drm_core_get_map_ofs,
40
+ .get_reg_ofs = drm_core_get_reg_ofs,
43
- .owner = THIS_MODULE,
45
- .release = drm_release,
46
- /* This was changed with Linux 2.6.33 but Fedora backported this
47
- * change to their 2.6.32 kernel. */
50
+ .owner = THIS_MODULE,
52
+ .release = drm_release,
53
+ /* This was changed with Linux 2.6.33 but Fedora backported this
54
+ * change to their 2.6.32 kernel. */
55
#if defined(DRM_UNLOCKED) || LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 33)
56
- .unlocked_ioctl = drm_ioctl,
57
+ .unlocked_ioctl = drm_ioctl,
64
- .fasync = drm_fasync,
67
- .name = DRIVER_NAME,
68
- .id_table = pciidlist,
72
+ .fasync = drm_fasync,
74
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39)
77
+ .name = DRIVER_NAME,
78
+ .id_table = pciidlist,
81
+ .name = DRIVER_NAME,
82
+ .desc = DRIVER_DESC,
83
+ .date = DRIVER_DATE,
84
+ .major = DRIVER_MAJOR,
85
+ .minor = DRIVER_MINOR,
86
+ .patchlevel = DRIVER_PATCHLEVEL,
89
- .name = DRIVER_NAME,
90
- .desc = DRIVER_DESC,
91
- .date = DRIVER_DATE,
92
- .major = DRIVER_MAJOR,
93
- .minor = DRIVER_MINOR,
94
- .patchlevel = DRIVER_PATCHLEVEL,
95
+#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 39)
96
+static struct pci_driver pci_driver =
98
+ .name = DRIVER_NAME,
99
+ .id_table = pciidlist,
103
static int __init vboxvideo_init(void)
105
- return drm_init(&driver);
106
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39)
107
+ return drm_init(&driver);
109
+ return drm_pci_init(&driver, &pci_driver);
113
static void __exit vboxvideo_exit(void)
116
+#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 39)
119
+ drm_pci_exit(&driver, &pci_driver);
123
Index: trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c
124
===================================================================
125
--- trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 33994)
126
+++ trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c (revision 36471)
127
@@ -447,12 +447,12 @@
130
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
131
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
132
static struct super_block *sf_get_sb(struct file_system_type *fs_type, int flags,
133
- const char *dev_name, void *data)
134
+ const char *dev_name, void *data)
137
return get_sb_nodev(fs_type, flags, data, sf_read_super_26);
140
+# elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
141
static int sf_get_sb(struct file_system_type *fs_type, int flags,
142
const char *dev_name, void *data, struct vfsmount *mnt)
144
return get_sb_nodev(fs_type, flags, data, sf_read_super_26, mnt);
148
+static struct dentry *sf_mount(struct file_system_type *fs_type, int flags,
149
+ const char *dev_name, void *data)
152
+ return mount_nodev(fs_type, flags, data, sf_read_super_26);
156
static struct file_system_type vboxsf_fs_type =
158
.owner = THIS_MODULE,
160
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
165
.kill_sb = kill_anon_super