Fix device type check
B_DEVICE_TYPE is a 16-bit numeric ID.
This commit is contained in:
committed by
Alexander von Gluck IV
parent
66fa3b1847
commit
0ae2a0c4d7
@@ -27,6 +27,7 @@
|
|||||||
#include <vm/vm.h>
|
#include <vm/vm.h>
|
||||||
#include <vm/vm_priv.h>
|
#include <vm/vm_priv.h>
|
||||||
#include <vm/VMAddressSpace.h>
|
#include <vm/VMAddressSpace.h>
|
||||||
|
#include <PCI.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -515,16 +516,13 @@ arch_int_init_post_device_manager(struct kernel_args *args)
|
|||||||
// iterate through the tree again and get an interrupt controller node
|
// iterate through the tree again and get an interrupt controller node
|
||||||
iterator.Rewind();
|
iterator.Rewind();
|
||||||
while (device_node *node = iterator.Next()) {
|
while (device_node *node = iterator.Next()) {
|
||||||
const char *deviceType;
|
uint16 pciBaseClass, pciSubType;
|
||||||
if (deviceManager->get_attr_string(node, B_DEVICE_TYPE,
|
if (deviceManager->get_attr_uint16(node, B_DEVICE_TYPE,
|
||||||
&deviceType, false) == B_OK) {
|
&pciBaseClass, false) == B_OK &&
|
||||||
bool isPIC = false;
|
deviceManager->get_attr_uint16(node, B_DEVICE_SUB_TYPE,
|
||||||
|
&pciSubType, false) == B_OK) {
|
||||||
/*
|
bool isPIC = (pciBaseClass == PCI_base_peripheral)
|
||||||
bool isPIC
|
&& (pciSubType == PCI_pic);
|
||||||
= (strcmp(deviceType, B_INTERRUPT_CONTROLLER_DRIVER_TYPE) == 0);
|
|
||||||
free(deviceType);
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (isPIC) {
|
if (isPIC) {
|
||||||
driver_module_info *driver;
|
driver_module_info *driver;
|
||||||
|
|||||||
Reference in New Issue
Block a user