diff options
Diffstat (limited to 'bsd-core/drm_drv.c')
-rw-r--r-- | bsd-core/drm_drv.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index 92d5700d..3f53a72f 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -150,6 +150,7 @@ int drm_probe(device_t dev, drm_pci_id_list_t *idlist) { drm_pci_id_list_t *id_entry; int vendor, device; +#if __FreeBSD_version < 700010 device_t realdev; if (!strcmp(device_get_name(dev), "drmsub")) @@ -158,6 +159,10 @@ int drm_probe(device_t dev, drm_pci_id_list_t *idlist) realdev = dev; vendor = pci_get_vendor(realdev); device = pci_get_device(realdev); +#else + vendor = pci_get_vendor(dev); + device = pci_get_device(dev); +#endif id_entry = drm_find_description(vendor, device, idlist); if (id_entry != NULL) { @@ -177,11 +182,14 @@ int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist) unit = device_get_unit(nbdev); dev = device_get_softc(nbdev); +#if __FreeBSD_version < 700010 if (!strcmp(device_get_name(nbdev), "drmsub")) dev->device = device_get_parent(nbdev); else dev->device = nbdev; - +#else + dev->device = nbdev; +#endif dev->devnode = make_dev(&drm_cdevsw, unit, DRM_DEV_UID, |