VirtualBox

Changeset 36471 in vbox


Ignore:
Timestamp:
Mar 30, 2011 9:41:27 AM (14 years ago)
Author:
vboxsync
Message:

Linux 2.6.39-rc1 compile fixes

Location:
trunk/src/VBox/Additions/linux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vboxvideo_drm.c

    r35662 r36471  
    6767
    6868static struct pci_device_id pciidlist[] = {
    69         vboxvideo_PCI_IDS
     69        vboxvideo_PCI_IDS
    7070};
    7171
     
    7373{
    7474# if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 28)
    75         return drm_vblank_init(dev, 1);
     75    return drm_vblank_init(dev, 1);
    7676#else
    7777    return 0;
     
    7979}
    8080
    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. */
     81static 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. */
    8687#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 37)
    87         .get_map_ofs = drm_core_get_map_ofs,
    88         .get_reg_ofs = drm_core_get_reg_ofs,
     88    .get_map_ofs = drm_core_get_map_ofs,
     89    .get_reg_ofs = drm_core_get_reg_ofs,
    8990#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. */
    9698#if defined(DRM_UNLOCKED) || LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 33)
    97                 .unlocked_ioctl = drm_ioctl,
     99        .unlocked_ioctl = drm_ioctl,
    98100#else
    99                 .ioctl = drm_ioctl,
     101        .ioctl = drm_ioctl,
    100102#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};
    109121
    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)
     123static struct pci_driver pci_driver =
     124{
     125    .name = DRIVER_NAME,
     126    .id_table = pciidlist,
    116127};
     128#endif
    117129
    118130static int __init vboxvideo_init(void)
    119131{
    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
    121137}
    122138
    123139static void __exit vboxvideo_exit(void)
    124140{
    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
    126146}
    127147
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

    r33994 r36471  
    447447}
    448448
    449 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
     449# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
    450450static 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)
    452452{
    453453    TRACE();
    454454    return get_sb_nodev(fs_type, flags, data, sf_read_super_26);
    455455}
    456 #else
     456# elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
    457457static int sf_get_sb(struct file_system_type *fs_type, int flags,
    458458                     const char *dev_name, void *data, struct vfsmount *mnt)
     
    461461    return get_sb_nodev(fs_type, flags, data, sf_read_super_26, mnt);
    462462}
    463 #endif
     463# else
     464static 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
    464471
    465472static struct file_system_type vboxsf_fs_type =
     
    467474    .owner   = THIS_MODULE,
    468475    .name    = "vboxsf",
     476# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
    469477    .get_sb  = sf_get_sb,
     478# else
     479    .mount   = sf_mount,
     480# endif
    470481    .kill_sb = kill_anon_super
    471482};
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette