X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fhwmon%2Fi5500_temp.c;h=a51038c6597d1ba0d5e4d98628b985c461179656;hb=75998bb263bf48c1c85d78cd2d2f3a97d3747cab;hp=400e0675a90bdd2e0e04cdcdd1a5ce3028526375;hpb=fbdd1b2affbd56f51aaa2a32073410133ca247f2;p=linux-2.6-microblaze.git diff --git a/drivers/hwmon/i5500_temp.c b/drivers/hwmon/i5500_temp.c index 400e0675a90b..a51038c6597d 100644 --- a/drivers/hwmon/i5500_temp.c +++ b/drivers/hwmon/i5500_temp.c @@ -58,7 +58,7 @@ static ssize_t temp1_input_show(struct device *dev, return sprintf(buf, "%ld\n", temp); } -static ssize_t show_thresh(struct device *dev, +static ssize_t thresh_show(struct device *dev, struct device_attribute *devattr, char *buf) { struct pci_dev *pdev = to_pci_dev(dev->parent); @@ -72,7 +72,7 @@ static ssize_t show_thresh(struct device *dev, return sprintf(buf, "%ld\n", temp); } -static ssize_t show_alarm(struct device *dev, +static ssize_t alarm_show(struct device *dev, struct device_attribute *devattr, char *buf) { struct pci_dev *pdev = to_pci_dev(dev->parent); @@ -84,11 +84,11 @@ static ssize_t show_alarm(struct device *dev, } static DEVICE_ATTR_RO(temp1_input); -static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, show_thresh, NULL, 0xE2); -static SENSOR_DEVICE_ATTR(temp1_max_hyst, S_IRUGO, show_thresh, NULL, 0xEC); -static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, show_thresh, NULL, 0xEE); -static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, show_alarm, NULL, 0); -static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, show_alarm, NULL, 1); +static SENSOR_DEVICE_ATTR_RO(temp1_crit, thresh, 0xE2); +static SENSOR_DEVICE_ATTR_RO(temp1_max_hyst, thresh, 0xEC); +static SENSOR_DEVICE_ATTR_RO(temp1_max, thresh, 0xEE); +static SENSOR_DEVICE_ATTR_RO(temp1_crit_alarm, alarm, 0); +static SENSOR_DEVICE_ATTR_RO(temp1_max_alarm, alarm, 1); static struct attribute *i5500_temp_attrs[] = { &dev_attr_temp1_input.attr,