Initialize variables before resource_int_value().
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
This commit is contained in:
parent
5569e03dab
commit
b56b1ddacc
@ -122,6 +122,7 @@ mvs_ch_attach(device_t dev)
|
||||
ch->unit = (intptr_t)device_get_ivars(dev);
|
||||
ch->quirks = ctlr->quirks;
|
||||
mtx_init(&ch->mtx, "MVS 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);
|
||||
if (ch->pm_level > 3)
|
||||
|
@ -111,6 +111,7 @@ mvs_attach(device_t dev)
|
||||
i++;
|
||||
ctlr->channels = mvs_ids[i].ports;
|
||||
ctlr->quirks = mvs_ids[i].quirks;
|
||||
ctlr->ccc = 0;
|
||||
resource_int_value(device_get_name(dev),
|
||||
device_get_unit(dev), "ccc", &ctlr->ccc);
|
||||
ctlr->cccc = 8;
|
||||
|
@ -114,6 +114,7 @@ mvs_attach(device_t dev)
|
||||
i++;
|
||||
ctlr->channels = mvs_ids[i].ports;
|
||||
ctlr->quirks = mvs_ids[i].quirks;
|
||||
ctlr->ccc = 0;
|
||||
resource_int_value(device_get_name(dev),
|
||||
device_get_unit(dev), "ccc", &ctlr->ccc);
|
||||
ctlr->cccc = 8;
|
||||
|
@ -465,6 +465,7 @@ siis_ch_attach(device_t dev)
|
||||
ch->dev = dev;
|
||||
ch->unit = (intptr_t)device_get_ivars(dev);
|
||||
ch->quirks = ctlr->quirks;
|
||||
ch->pm_level = 0;
|
||||
resource_int_value(device_get_name(dev),
|
||||
device_get_unit(dev), "pm_level", &ch->pm_level);
|
||||
resource_int_value(device_get_name(dev),
|
||||
|
Loading…
x
Reference in New Issue
Block a user