diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-01-24 08:16:22 -0500 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2015-01-24 08:16:22 -0500 |
commit | 86c725e3c5a6baa5316787e0b017d8ac8b0facd8 (patch) | |
tree | 9c38711171fa3a65148c5d46e9ea5d02daeccd37 /drivers/hwmon | |
parent | aef64d0d380132c11e27c44b0f73afb9bdb59771 (diff) |
hwmon: (i5500_temp) Convert to use ATTRIBUTE_GROUPS macro
Use ATTRIBUTE_GROUPS macro to simplify the code a bit.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/i5500_temp.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/hwmon/i5500_temp.c b/drivers/hwmon/i5500_temp.c index 2922be3ef83f..3e3ccbf18b4e 100644 --- a/drivers/hwmon/i5500_temp.c +++ b/drivers/hwmon/i5500_temp.c | |||
@@ -90,7 +90,7 @@ static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, show_thresh, NULL, 0xEE); | |||
90 | static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, show_alarm, NULL, 0); | 90 | static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, show_alarm, NULL, 0); |
91 | static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, show_alarm, NULL, 1); | 91 | static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, show_alarm, NULL, 1); |
92 | 92 | ||
93 | static struct attribute *i5500_temp_attributes[] = { | 93 | static struct attribute *i5500_temp_attrs[] = { |
94 | &dev_attr_temp1_input.attr, | 94 | &dev_attr_temp1_input.attr, |
95 | &sensor_dev_attr_temp1_crit.dev_attr.attr, | 95 | &sensor_dev_attr_temp1_crit.dev_attr.attr, |
96 | &sensor_dev_attr_temp1_max_hyst.dev_attr.attr, | 96 | &sensor_dev_attr_temp1_max_hyst.dev_attr.attr, |
@@ -100,14 +100,7 @@ static struct attribute *i5500_temp_attributes[] = { | |||
100 | NULL | 100 | NULL |
101 | }; | 101 | }; |
102 | 102 | ||
103 | static const struct attribute_group i5500_temp_group = { | 103 | ATTRIBUTE_GROUPS(i5500_temp); |
104 | .attrs = i5500_temp_attributes, | ||
105 | }; | ||
106 | |||
107 | static const struct attribute_group *i5500_temp_groups[] = { | ||
108 | &i5500_temp_group, | ||
109 | NULL | ||
110 | }; | ||
111 | 104 | ||
112 | static const struct pci_device_id i5500_temp_ids[] = { | 105 | static const struct pci_device_id i5500_temp_ids[] = { |
113 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x3438) }, | 106 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x3438) }, |
@@ -133,7 +126,7 @@ static int i5500_temp_probe(struct pci_dev *pdev, | |||
133 | pci_read_config_byte(pdev, REG_TSFSC, &tsfsc); | 126 | pci_read_config_byte(pdev, REG_TSFSC, &tsfsc); |
134 | pci_read_config_dword(pdev, REG_TSTIMER, &tstimer); | 127 | pci_read_config_dword(pdev, REG_TSTIMER, &tstimer); |
135 | if (tsfsc == 0x7F && tstimer == 0x07D30D40) { | 128 | if (tsfsc == 0x7F && tstimer == 0x07D30D40) { |
136 | dev_warn(&pdev->dev, "Sensor seems to be disabled\n"); | 129 | dev_notice(&pdev->dev, "Sensor seems to be disabled\n"); |
137 | return -ENODEV; | 130 | return -ENODEV; |
138 | } | 131 | } |
139 | 132 | ||