acpi: fix pcibusno() when PCI0._ADR = 0
libaml comresses zero integer as nil, so remove the nil check. this makes interrupts work in vmware with efi.
This commit is contained in:
parent
f5e45a02d4
commit
3f09d4b623
|
@ -260,9 +260,7 @@ pcibusno(void *dot)
|
||||||
if((x = amlwalk(dot, "^_BBN")) == nil)
|
if((x = amlwalk(dot, "^_BBN")) == nil)
|
||||||
if((x = amlwalk(dot, "^_ADR")) == nil)
|
if((x = amlwalk(dot, "^_ADR")) == nil)
|
||||||
return -1;
|
return -1;
|
||||||
if((p = amlval(x)) == nil)
|
adr = amlint(amlval(x));
|
||||||
return -1;
|
|
||||||
adr = amlint(p);
|
|
||||||
/* if root bridge, then we are done here */
|
/* if root bridge, then we are done here */
|
||||||
if(id != nil && (strcmp(id, "PNP0A03")==0 || strcmp(id, "PNP0A08")==0))
|
if(id != nil && (strcmp(id, "PNP0A03")==0 || strcmp(id, "PNP0A08")==0))
|
||||||
return adr;
|
return adr;
|
||||||
|
|
Loading…
Reference in a new issue