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

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

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
hwmon: (coretemp) Fix section mismatch
hwmon: (pmbus) Initialize sysfs attributes
hwmon: (coretemp) Update comments describing the handling of HT CPUs
hwmon: (coretemp) Initialize sysfs attributes

+10 -7
+9 -7
drivers/hwmon/coretemp.c
··· 350 350 351 351 static int create_name_attr(struct platform_data *pdata, struct device *dev) 352 352 { 353 + sysfs_attr_init(&pdata->name_attr.attr); 353 354 pdata->name_attr.attr.name = "name"; 354 355 pdata->name_attr.attr.mode = S_IRUGO; 355 356 pdata->name_attr.show = show_name; ··· 373 372 for (i = 0; i < MAX_ATTRS; i++) { 374 373 snprintf(tdata->attr_name[i], CORETEMP_NAME_LENGTH, names[i], 375 374 attr_no); 375 + sysfs_attr_init(&tdata->sd_attrs[i].dev_attr.attr); 376 376 tdata->sd_attrs[i].dev_attr.attr.name = tdata->attr_name[i]; 377 377 tdata->sd_attrs[i].dev_attr.attr.mode = S_IRUGO; 378 378 tdata->sd_attrs[i].dev_attr.show = rd_ptr[i]; ··· 424 422 } 425 423 } 426 424 427 - static int chk_ucode_version(struct platform_device *pdev) 425 + static int __devinit chk_ucode_version(struct platform_device *pdev) 428 426 { 429 427 struct cpuinfo_x86 *c = &cpu_data(pdev->id); 430 428 int err; ··· 511 509 /* 512 510 * Provide a single set of attributes for all HT siblings of a core 513 511 * to avoid duplicate sensors (the processor ID and core ID of all 514 - * HT siblings of a core is the same). 515 - * Skip if a HT sibling of this core is already online. 512 + * HT siblings of a core are the same). 513 + * Skip if a HT sibling of this core is already registered. 516 514 * This is not an error. 517 515 */ 518 516 if (pdata->core_data[attr_no] != NULL) ··· 772 770 coretemp_remove_core(pdata, &pdev->dev, indx); 773 771 774 772 /* 775 - * If a core is taken offline, but a HT sibling of the same core is 776 - * still online, register the alternate sibling. This ensures that 777 - * exactly one set of attributes is provided as long as at least one 778 - * HT sibling of a core is online. 773 + * If a HT sibling of a core is taken offline, but another HT sibling 774 + * of the same core is still online, register the alternate sibling. 775 + * This ensures that exactly one set of attributes is provided as long 776 + * as at least one HT sibling of a core is online. 779 777 */ 780 778 for_each_sibling(i, cpu) { 781 779 if (i != cpu) {
+1
drivers/hwmon/pmbus_core.c
··· 707 707 struct sensor_device_attribute *a \ 708 708 = &data->_type##s[data->num_##_type##s].attribute; \ 709 709 BUG_ON(data->num_attributes >= data->max_attributes); \ 710 + sysfs_attr_init(&a->dev_attr.attr); \ 710 711 a->dev_attr.attr.name = _name; \ 711 712 a->dev_attr.attr.mode = _mode; \ 712 713 a->dev_attr.show = _show; \