diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/asus_atk0110.c | 5 | ||||
-rw-r--r-- | drivers/hwmon/coretemp.c | 4 | ||||
-rw-r--r-- | drivers/hwmon/ibmaem.c | 2 | ||||
-rw-r--r-- | drivers/hwmon/ibmpex.c | 1 | ||||
-rw-r--r-- | drivers/hwmon/s3c-hwmon.c | 2 |
5 files changed, 6 insertions, 8 deletions
diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index b5e892017e0c..dcb78a7a8047 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c | |||
@@ -268,6 +268,7 @@ static struct device_attribute atk_name_attr = | |||
268 | static void atk_init_attribute(struct device_attribute *attr, char *name, | 268 | static void atk_init_attribute(struct device_attribute *attr, char *name, |
269 | sysfs_show_func show) | 269 | sysfs_show_func show) |
270 | { | 270 | { |
271 | sysfs_attr_init(&attr->attr); | ||
271 | attr->attr.name = name; | 272 | attr->attr.name = name; |
272 | attr->attr.mode = 0444; | 273 | attr->attr.mode = 0444; |
273 | attr->show = show; | 274 | attr->show = show; |
@@ -1188,19 +1189,15 @@ static int atk_create_files(struct atk_data *data) | |||
1188 | int err; | 1189 | int err; |
1189 | 1190 | ||
1190 | list_for_each_entry(s, &data->sensor_list, list) { | 1191 | list_for_each_entry(s, &data->sensor_list, list) { |
1191 | sysfs_attr_init(&s->input_attr.attr); | ||
1192 | err = device_create_file(data->hwmon_dev, &s->input_attr); | 1192 | err = device_create_file(data->hwmon_dev, &s->input_attr); |
1193 | if (err) | 1193 | if (err) |
1194 | return err; | 1194 | return err; |
1195 | sysfs_attr_init(&s->label_attr.attr); | ||
1196 | err = device_create_file(data->hwmon_dev, &s->label_attr); | 1195 | err = device_create_file(data->hwmon_dev, &s->label_attr); |
1197 | if (err) | 1196 | if (err) |
1198 | return err; | 1197 | return err; |
1199 | sysfs_attr_init(&s->limit1_attr.attr); | ||
1200 | err = device_create_file(data->hwmon_dev, &s->limit1_attr); | 1198 | err = device_create_file(data->hwmon_dev, &s->limit1_attr); |
1201 | if (err) | 1199 | if (err) |
1202 | return err; | 1200 | return err; |
1203 | sysfs_attr_init(&s->limit2_attr.attr); | ||
1204 | err = device_create_file(data->hwmon_dev, &s->limit2_attr); | 1201 | err = device_create_file(data->hwmon_dev, &s->limit2_attr); |
1205 | if (err) | 1202 | if (err) |
1206 | return err; | 1203 | return err; |
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 85e937984ff7..0070d5476dd0 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c | |||
@@ -97,9 +97,7 @@ struct platform_data { | |||
97 | struct pdev_entry { | 97 | struct pdev_entry { |
98 | struct list_head list; | 98 | struct list_head list; |
99 | struct platform_device *pdev; | 99 | struct platform_device *pdev; |
100 | unsigned int cpu; | ||
101 | u16 phys_proc_id; | 100 | u16 phys_proc_id; |
102 | u16 cpu_core_id; | ||
103 | }; | 101 | }; |
104 | 102 | ||
105 | static LIST_HEAD(pdev_list); | 103 | static LIST_HEAD(pdev_list); |
@@ -653,9 +651,7 @@ static int __cpuinit coretemp_device_add(unsigned int cpu) | |||
653 | } | 651 | } |
654 | 652 | ||
655 | pdev_entry->pdev = pdev; | 653 | pdev_entry->pdev = pdev; |
656 | pdev_entry->cpu = cpu; | ||
657 | pdev_entry->phys_proc_id = TO_PHYS_ID(cpu); | 654 | pdev_entry->phys_proc_id = TO_PHYS_ID(cpu); |
658 | pdev_entry->cpu_core_id = TO_CORE_ID(cpu); | ||
659 | 655 | ||
660 | list_add_tail(&pdev_entry->list, &pdev_list); | 656 | list_add_tail(&pdev_entry->list, &pdev_list); |
661 | mutex_unlock(&pdev_list_mutex); | 657 | mutex_unlock(&pdev_list_mutex); |
diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c index 537409d07ee7..1a409c5bc9bc 100644 --- a/drivers/hwmon/ibmaem.c +++ b/drivers/hwmon/ibmaem.c | |||
@@ -947,6 +947,7 @@ static int aem_register_sensors(struct aem_data *data, | |||
947 | 947 | ||
948 | /* Set up read-only sensors */ | 948 | /* Set up read-only sensors */ |
949 | while (ro->label) { | 949 | while (ro->label) { |
950 | sysfs_attr_init(&sensors->dev_attr.attr); | ||
950 | sensors->dev_attr.attr.name = ro->label; | 951 | sensors->dev_attr.attr.name = ro->label; |
951 | sensors->dev_attr.attr.mode = S_IRUGO; | 952 | sensors->dev_attr.attr.mode = S_IRUGO; |
952 | sensors->dev_attr.show = ro->show; | 953 | sensors->dev_attr.show = ro->show; |
@@ -963,6 +964,7 @@ static int aem_register_sensors(struct aem_data *data, | |||
963 | 964 | ||
964 | /* Set up read-write sensors */ | 965 | /* Set up read-write sensors */ |
965 | while (rw->label) { | 966 | while (rw->label) { |
967 | sysfs_attr_init(&sensors->dev_attr.attr); | ||
966 | sensors->dev_attr.attr.name = rw->label; | 968 | sensors->dev_attr.attr.name = rw->label; |
967 | sensors->dev_attr.attr.mode = S_IRUGO | S_IWUSR; | 969 | sensors->dev_attr.attr.mode = S_IRUGO | S_IWUSR; |
968 | sensors->dev_attr.show = rw->show; | 970 | sensors->dev_attr.show = rw->show; |
diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c index 06d4eafcf76b..41dbf8161ed7 100644 --- a/drivers/hwmon/ibmpex.c +++ b/drivers/hwmon/ibmpex.c | |||
@@ -358,6 +358,7 @@ static int create_sensor(struct ibmpex_bmc_data *data, int type, | |||
358 | else if (type == POWER_SENSOR) | 358 | else if (type == POWER_SENSOR) |
359 | sprintf(n, power_sensor_name_templates[func], "power", counter); | 359 | sprintf(n, power_sensor_name_templates[func], "power", counter); |
360 | 360 | ||
361 | sysfs_attr_init(&data->sensors[sensor].attr[func].dev_attr.attr); | ||
361 | data->sensors[sensor].attr[func].dev_attr.attr.name = n; | 362 | data->sensors[sensor].attr[func].dev_attr.attr.name = n; |
362 | data->sensors[sensor].attr[func].dev_attr.attr.mode = S_IRUGO; | 363 | data->sensors[sensor].attr[func].dev_attr.attr.mode = S_IRUGO; |
363 | data->sensors[sensor].attr[func].dev_attr.show = ibmpex_show_sensor; | 364 | data->sensors[sensor].attr[func].dev_attr.show = ibmpex_show_sensor; |
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c index 92b42db43bcf..b39f52e2752a 100644 --- a/drivers/hwmon/s3c-hwmon.c +++ b/drivers/hwmon/s3c-hwmon.c | |||
@@ -232,6 +232,7 @@ static int s3c_hwmon_create_attr(struct device *dev, | |||
232 | 232 | ||
233 | attr = &attrs->in; | 233 | attr = &attrs->in; |
234 | attr->index = channel; | 234 | attr->index = channel; |
235 | sysfs_attr_init(&attr->dev_attr.attr); | ||
235 | attr->dev_attr.attr.name = attrs->in_name; | 236 | attr->dev_attr.attr.name = attrs->in_name; |
236 | attr->dev_attr.attr.mode = S_IRUGO; | 237 | attr->dev_attr.attr.mode = S_IRUGO; |
237 | attr->dev_attr.show = s3c_hwmon_ch_show; | 238 | attr->dev_attr.show = s3c_hwmon_ch_show; |
@@ -249,6 +250,7 @@ static int s3c_hwmon_create_attr(struct device *dev, | |||
249 | 250 | ||
250 | attr = &attrs->label; | 251 | attr = &attrs->label; |
251 | attr->index = channel; | 252 | attr->index = channel; |
253 | sysfs_attr_init(&attr->dev_attr.attr); | ||
252 | attr->dev_attr.attr.name = attrs->label_name; | 254 | attr->dev_attr.attr.name = attrs->label_name; |
253 | attr->dev_attr.attr.mode = S_IRUGO; | 255 | attr->dev_attr.attr.mode = S_IRUGO; |
254 | attr->dev_attr.show = s3c_hwmon_label_show; | 256 | attr->dev_attr.show = s3c_hwmon_label_show; |