Initialize variables before resource_int_value().
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
This commit is contained in:
parent
8d5605988e
commit
6e88c2c572
@ -159,6 +159,7 @@ ahci_attach(device_t dev)
|
||||
device_t child;
|
||||
|
||||
ctlr->dev = dev;
|
||||
ctlr->ccc = 0;
|
||||
resource_int_value(device_get_name(dev),
|
||||
device_get_unit(dev), "ccc", &ctlr->ccc);
|
||||
|
||||
@ -624,6 +625,7 @@ ahci_ch_attach(device_t dev)
|
||||
ch->subdeviceid = ctlr->subdeviceid;
|
||||
ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1;
|
||||
mtx_init(&ch->mtx, "AHCI channel lock", NULL, MTX_DEF);
|
||||
ch->pm_level = 0;
|
||||
resource_int_value(device_get_name(dev),
|
||||
device_get_unit(dev), "pm_level", &ch->pm_level);
|
||||
STAILQ_INIT(&ch->doneq);
|
||||
|
Loading…
Reference in New Issue
Block a user