mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Initialize iobase from the resource allocated by bus_alloc_resource_any()
rather than with isa_get_port(). This value is only used in diagnostics, but the value we want to print is the value in our resource, not in any hint.
This commit is contained in:
parent
b25aec32ff
commit
badcc39b73
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133982
@ -137,7 +137,6 @@ ahc_isa_probe(device_t dev)
|
||||
int error;
|
||||
int zero;
|
||||
|
||||
iobase = isa_get_port(dev);
|
||||
error = ENODEV;
|
||||
zero = 0;
|
||||
regs = NULL;
|
||||
@ -145,10 +144,11 @@ ahc_isa_probe(device_t dev)
|
||||
|
||||
regs = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &zero, RF_ACTIVE);
|
||||
if (regs == NULL) {
|
||||
device_printf(dev, "ioport 0x%x alloc failed\n", iobase);
|
||||
device_printf(dev, "No resources alloated.\n");
|
||||
return (ENOMEM);
|
||||
}
|
||||
|
||||
iobase = rman_get_start(regs);
|
||||
tag = rman_get_bustag(regs);
|
||||
bsh = rman_get_bushandle(regs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user