Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158025543
D56998.id178029.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1010 B
Referenced Files
None
Subscribers
None
D56998.id178029.diff
View Options
diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c
--- a/sys/dev/sound/pcm/ac97.c
+++ b/sys/dev/sound/pcm/ac97.c
@@ -628,7 +628,7 @@
}
pdev = codec->dev;
- while (strcmp(device_get_name(device_get_parent(pdev)), "pci") != 0) {
+ while (!is_pci_device(pdev)) {
/* find the top-level PCI device handler */
pdev = device_get_parent(pdev);
}
diff --git a/sys/dev/thunderbolt/tb_pcib.c b/sys/dev/thunderbolt/tb_pcib.c
--- a/sys/dev/thunderbolt/tb_pcib.c
+++ b/sys/dev/thunderbolt/tb_pcib.c
@@ -548,16 +548,13 @@
{
struct tb_pcib_ident *n;
device_t parent;
- devclass_t dc;
/*
* This driver is only valid if the parent device is a PCI-PCI
- * bridge. To determine that, check if the grandparent is a
- * PCI bus.
+ * bridge.
*/
parent = device_get_parent(dev);
- dc = device_get_devclass(device_get_parent(parent));
- if (strcmp(devclass_get_name(dc), "pci") != 0)
+ if (!is_pci_device(parent))
return (ENXIO);
if ((n = tb_pcib_find_ident(parent)) != NULL) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 28, 3:19 PM (3 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33563694
Default Alt Text
D56998.id178029.diff (1010 B)
Attached To
Mode
D56998: sys: Use is_pci_device instead of checking device or devclass names
Attached
Detach File
Event Timeline
Log In to Comment