Initialize variables before resource_int_value().

Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
This commit is contained in:
mav 2014-09-12 12:04:51 +00:00
parent 5569e03dab
commit b56b1ddacc
4 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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),