Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon patches from Guenter Roeck:
- Fix build warning in ad7314 driver
- Fix pci_device_id array access in fam15h_power driver, introduced by
commit 00250ec90963 ("hwmon: fam15h_power: fix bogus values with
current BIOSes")

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (fam15h_power) Fix pci_device_id array
hwmon: (ad7314) Fix build warning

+11 -10
+5 -7
drivers/hwmon/ad7314.c
··· 47 47 u16 rx ____cacheline_aligned; 48 48 }; 49 49 50 - static int ad7314_spi_read(struct ad7314_data *chip, s16 *data) 50 + static int ad7314_spi_read(struct ad7314_data *chip) 51 51 { 52 52 int ret; 53 53 ··· 57 57 return ret; 58 58 } 59 59 60 - *data = be16_to_cpu(chip->rx); 61 - 62 - return ret; 60 + return be16_to_cpu(chip->rx); 63 61 } 64 62 65 63 static ssize_t ad7314_show_temperature(struct device *dev, ··· 68 70 s16 data; 69 71 int ret; 70 72 71 - ret = ad7314_spi_read(chip, &data); 73 + ret = ad7314_spi_read(chip); 72 74 if (ret < 0) 73 75 return ret; 74 76 switch (spi_get_device_id(chip->spi_dev)->driver_data) { 75 77 case ad7314: 76 - data = (data & AD7314_TEMP_MASK) >> AD7314_TEMP_OFFSET; 78 + data = (ret & AD7314_TEMP_MASK) >> AD7314_TEMP_OFFSET; 77 79 data = (data << 6) >> 6; 78 80 79 81 return sprintf(buf, "%d\n", 250 * data); ··· 84 86 * with a sign bit - which is a 14 bit 2's complement 85 87 * register. 1lsb - 31.25 milli degrees centigrade 86 88 */ 87 - data &= ADT7301_TEMP_MASK; 89 + data = ret & ADT7301_TEMP_MASK; 88 90 data = (data << 2) >> 2; 89 91 90 92 return sprintf(buf, "%d\n",
+6 -3
drivers/hwmon/fam15h_power.c
··· 128 128 * counter saturations resulting in bogus power readings. 129 129 * We correct this value ourselves to cope with older BIOSes. 130 130 */ 131 + static DEFINE_PCI_DEVICE_TABLE(affected_device) = { 132 + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, 133 + { 0 } 134 + }; 135 + 131 136 static void __devinit tweak_runavg_range(struct pci_dev *pdev) 132 137 { 133 138 u32 val; 134 - const struct pci_device_id affected_device = { 135 - PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }; 136 139 137 140 /* 138 141 * let this quirk apply only to the current version of the 139 142 * northbridge, since future versions may change the behavior 140 143 */ 141 - if (!pci_match_id(&affected_device, pdev)) 144 + if (!pci_match_id(affected_device, pdev)) 142 145 return; 143 146 144 147 pci_bus_read_config_dword(pdev->bus,