diff options
Diffstat (limited to 'drivers/hwmon/via686a.c')
-rw-r--r-- | drivers/hwmon/via686a.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/hwmon/via686a.c b/drivers/hwmon/via686a.c index 60e94879f415..688ccf924c3a 100644 --- a/drivers/hwmon/via686a.c +++ b/drivers/hwmon/via686a.c | |||
@@ -589,10 +589,8 @@ static int via686a_detect(struct i2c_adapter *adapter) | |||
589 | u16 val; | 589 | u16 val; |
590 | 590 | ||
591 | /* 8231 requires multiple of 256, we enforce that on 686 as well */ | 591 | /* 8231 requires multiple of 256, we enforce that on 686 as well */ |
592 | if (force_addr) | ||
593 | address = force_addr & 0xFF00; | ||
594 | |||
595 | if (force_addr) { | 592 | if (force_addr) { |
593 | address = force_addr & 0xFF00; | ||
596 | dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", | 594 | dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", |
597 | address); | 595 | address); |
598 | if (PCIBIOS_SUCCESSFUL != | 596 | if (PCIBIOS_SUCCESSFUL != |
@@ -603,11 +601,17 @@ static int via686a_detect(struct i2c_adapter *adapter) | |||
603 | pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val)) | 601 | pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val)) |
604 | return -ENODEV; | 602 | return -ENODEV; |
605 | if (!(val & 0x0001)) { | 603 | if (!(val & 0x0001)) { |
606 | dev_warn(&adapter->dev, "enabling sensors\n"); | 604 | if (force_addr) { |
607 | if (PCIBIOS_SUCCESSFUL != | 605 | dev_info(&adapter->dev, "enabling sensors\n"); |
608 | pci_write_config_word(s_bridge, VIA686A_ENABLE_REG, | 606 | if (PCIBIOS_SUCCESSFUL != |
609 | val | 0x0001)) | 607 | pci_write_config_word(s_bridge, VIA686A_ENABLE_REG, |
608 | val | 0x0001)) | ||
609 | return -ENODEV; | ||
610 | } else { | ||
611 | dev_warn(&adapter->dev, "sensors disabled - enable " | ||
612 | "with force_addr=0x%x\n", address); | ||
610 | return -ENODEV; | 613 | return -ENODEV; |
614 | } | ||
611 | } | 615 | } |
612 | 616 | ||
613 | /* Reserve the ISA region */ | 617 | /* Reserve the ISA region */ |