aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 3522723eb6b8..7522bd5f94da 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1526,8 +1526,17 @@ static int try_init_acpi(int intf_num, struct smi_info **new_info)
1526 info->irq_setup = NULL; 1526 info->irq_setup = NULL;
1527 } 1527 }
1528 1528
1529 regspacings[intf_num] = spmi->addr.register_bit_width / 8; 1529 if (spmi->addr.register_bit_width) {
1530 info->io.regspacing = spmi->addr.register_bit_width / 8; 1530 /* A (hopefully) properly formed register bit width. */
1531 regspacings[intf_num] = spmi->addr.register_bit_width / 8;
1532 info->io.regspacing = spmi->addr.register_bit_width / 8;
1533 } else {
1534 /* Some broken systems get this wrong and set the value
1535 * to zero. Assume it is the default spacing. If that
1536 * is wrong, too bad, the vendor should fix the tables. */
1537 regspacings[intf_num] = DEFAULT_REGSPACING;
1538 info->io.regspacing = DEFAULT_REGSPACING;
1539 }
1531 regsizes[intf_num] = regspacings[intf_num]; 1540 regsizes[intf_num] = regspacings[intf_num];
1532 info->io.regsize = regsizes[intf_num]; 1541 info->io.regsize = regsizes[intf_num];
1533 regshifts[intf_num] = spmi->addr.register_bit_offset; 1542 regshifts[intf_num] = spmi->addr.register_bit_offset;