summaryrefslogtreecommitdiff
path: root/bsd-core/drm_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core/drm_drv.c')
-rw-r--r--bsd-core/drm_drv.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index 85e86d36..2be461da 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -155,53 +155,53 @@ static int drm_msi_is_blacklisted(int vendor, int device)
return 0;
}
-int drm_probe(device_t dev, drm_pci_id_list_t *idlist)
+int drm_probe(device_t kdev, 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"))
- realdev = device_get_parent(dev);
+ if (!strcmp(device_get_name(kdev), "drmsub"))
+ realdev = device_get_parent(kdev);
else
- realdev = dev;
+ realdev = kdev;
vendor = pci_get_vendor(realdev);
device = pci_get_device(realdev);
#else
- vendor = pci_get_vendor(dev);
- device = pci_get_device(dev);
+ vendor = pci_get_vendor(kdev);
+ device = pci_get_device(kdev);
#endif
- if (pci_get_class(dev) != PCIC_DISPLAY
- || pci_get_subclass(dev) != PCIS_DISPLAY_VGA)
+ if (pci_get_class(kdev) != PCIC_DISPLAY
+ || pci_get_subclass(kdev) != PCIS_DISPLAY_VGA)
return ENXIO;
id_entry = drm_find_description(vendor, device, idlist);
if (id_entry != NULL) {
- device_set_desc(dev, id_entry->name);
+ device_set_desc(kdev, id_entry->name);
return 0;
}
return ENXIO;
}
-int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist)
+int drm_attach(device_t kdev, drm_pci_id_list_t *idlist)
{
struct drm_device *dev;
drm_pci_id_list_t *id_entry;
int unit, msicount;
- unit = device_get_unit(nbdev);
- dev = device_get_softc(nbdev);
+ unit = device_get_unit(kdev);
+ dev = device_get_softc(kdev);
#if __FreeBSD_version < 700010
- if (!strcmp(device_get_name(nbdev), "drmsub"))
- dev->device = device_get_parent(nbdev);
+ if (!strcmp(device_get_name(kdev), "drmsub"))
+ dev->device = device_get_parent(kdev);
else
- dev->device = nbdev;
+ dev->device = kdev;
#else
- dev->device = nbdev;
+ dev->device = kdev;
#endif
dev->devnode = make_dev(&drm_cdevsw,
unit,
@@ -256,11 +256,11 @@ int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist)
return drm_load(dev);
}
-int drm_detach(device_t nbdev)
+int drm_detach(device_t kdev)
{
struct drm_device *dev;
- dev = device_get_softc(nbdev);
+ dev = device_get_softc(kdev);
drm_unload(dev);