diff options
author | Robert Noland <rnoland@2hip.net> | 2009-03-16 00:41:23 -0500 |
---|---|---|
committer | Robert Noland <rnoland@2hip.net> | 2009-03-16 00:41:23 -0500 |
commit | dec955d728505f060afccd047ff2b572cb4ba3c1 (patch) | |
tree | 8ba5ecb37b881eb4fd36370169f27015dda59f6e | |
parent | 44fec1a8e487a14e0221e32759cc16ce9fcd7b00 (diff) |
FreeBSD: Add support for matching solely on vedor id.
This also adds that ability to set device name from VPD, but that
doesn't seem to be working...
-rw-r--r-- | bsd-core/drm_drv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index 883e3a0f..a9165a4a 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -179,7 +179,10 @@ int drm_probe(device_t kdev, drm_pci_id_list_t *idlist) id_entry = drm_find_description(vendor, device, idlist); if (id_entry != NULL) { - device_set_desc(kdev, id_entry->name); + if (!device_get_desc(kdev)) { + DRM_DEBUG("desc : %s\n", device_get_desc(kdev)); + device_set_desc(kdev, id_entry->name); + } return 0; } @@ -287,7 +290,8 @@ drm_pci_id_list_t *drm_find_description(int vendor, int device, for (i = 0; idlist[i].vendor != 0; i++) { if ((idlist[i].vendor == vendor) && - (idlist[i].device == device)) { + ((idlist[i].device == device) || + (idlist[i].device == 0))) { return &idlist[i]; } } |