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 'platform-drivers-x86-v4.1-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86

Pull x86 platform driver fix from Darren Hart:
"thinkpad_acpi: Revert unintentional device attribute renaming"

* tag 'platform-drivers-x86-v4.1-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
thinkpad_acpi: Revert unintentional device attribute renaming

+19 -18
+19 -18
drivers/platform/x86/thinkpad_acpi.c
··· 2897 2897 return snprintf(buf, PAGE_SIZE, "%d\n", hotkey_wakeup_reason); 2898 2898 } 2899 2899 2900 - static DEVICE_ATTR_RO(hotkey_wakeup_reason); 2900 + static DEVICE_ATTR(wakeup_reason, S_IRUGO, hotkey_wakeup_reason_show, NULL); 2901 2901 2902 2902 static void hotkey_wakeup_reason_notify_change(void) 2903 2903 { ··· 2913 2913 return snprintf(buf, PAGE_SIZE, "%d\n", hotkey_autosleep_ack); 2914 2914 } 2915 2915 2916 - static DEVICE_ATTR_RO(hotkey_wakeup_hotunplug_complete); 2916 + static DEVICE_ATTR(wakeup_hotunplug_complete, S_IRUGO, 2917 + hotkey_wakeup_hotunplug_complete_show, NULL); 2917 2918 2918 2919 static void hotkey_wakeup_hotunplug_complete_notify_change(void) 2919 2920 { ··· 2979 2978 &dev_attr_hotkey_enable.attr, 2980 2979 &dev_attr_hotkey_bios_enabled.attr, 2981 2980 &dev_attr_hotkey_bios_mask.attr, 2982 - &dev_attr_hotkey_wakeup_reason.attr, 2983 - &dev_attr_hotkey_wakeup_hotunplug_complete.attr, 2981 + &dev_attr_wakeup_reason.attr, 2982 + &dev_attr_wakeup_hotunplug_complete.attr, 2984 2983 &dev_attr_hotkey_mask.attr, 2985 2984 &dev_attr_hotkey_all_mask.attr, 2986 2985 &dev_attr_hotkey_recommended_mask.attr, ··· 4394 4393 attr, buf, count); 4395 4394 } 4396 4395 4397 - static DEVICE_ATTR_RW(wan_enable); 4396 + static DEVICE_ATTR(wwan_enable, S_IWUSR | S_IRUGO, 4397 + wan_enable_show, wan_enable_store); 4398 4398 4399 4399 /* --------------------------------------------------------------------- */ 4400 4400 4401 4401 static struct attribute *wan_attributes[] = { 4402 - &dev_attr_wan_enable.attr, 4402 + &dev_attr_wwan_enable.attr, 4403 4403 NULL 4404 4404 }; 4405 4405 ··· 8140 8138 return count; 8141 8139 } 8142 8140 8143 - static DEVICE_ATTR_RW(fan_pwm1_enable); 8141 + static DEVICE_ATTR(pwm1_enable, S_IWUSR | S_IRUGO, 8142 + fan_pwm1_enable_show, fan_pwm1_enable_store); 8144 8143 8145 8144 /* sysfs fan pwm1 ------------------------------------------------------ */ 8146 8145 static ssize_t fan_pwm1_show(struct device *dev, ··· 8201 8198 return (rc) ? rc : count; 8202 8199 } 8203 8200 8204 - static DEVICE_ATTR_RW(fan_pwm1); 8201 + static DEVICE_ATTR(pwm1, S_IWUSR | S_IRUGO, fan_pwm1_show, fan_pwm1_store); 8205 8202 8206 8203 /* sysfs fan fan1_input ------------------------------------------------ */ 8207 8204 static ssize_t fan_fan1_input_show(struct device *dev, ··· 8218 8215 return snprintf(buf, PAGE_SIZE, "%u\n", speed); 8219 8216 } 8220 8217 8221 - static DEVICE_ATTR_RO(fan_fan1_input); 8218 + static DEVICE_ATTR(fan1_input, S_IRUGO, fan_fan1_input_show, NULL); 8222 8219 8223 8220 /* sysfs fan fan2_input ------------------------------------------------ */ 8224 8221 static ssize_t fan_fan2_input_show(struct device *dev, ··· 8235 8232 return snprintf(buf, PAGE_SIZE, "%u\n", speed); 8236 8233 } 8237 8234 8238 - static DEVICE_ATTR_RO(fan_fan2_input); 8235 + static DEVICE_ATTR(fan2_input, S_IRUGO, fan_fan2_input_show, NULL); 8239 8236 8240 8237 /* sysfs fan fan_watchdog (hwmon driver) ------------------------------- */ 8241 8238 static ssize_t fan_fan_watchdog_show(struct device_driver *drv, ··· 8268 8265 8269 8266 /* --------------------------------------------------------------------- */ 8270 8267 static struct attribute *fan_attributes[] = { 8271 - &dev_attr_fan_pwm1_enable.attr, &dev_attr_fan_pwm1.attr, 8272 - &dev_attr_fan_fan1_input.attr, 8268 + &dev_attr_pwm1_enable.attr, &dev_attr_pwm1.attr, 8269 + &dev_attr_fan1_input.attr, 8273 8270 NULL, /* for fan2_input */ 8274 8271 NULL 8275 8272 }; ··· 8403 8400 if (tp_features.second_fan) { 8404 8401 /* attach second fan tachometer */ 8405 8402 fan_attributes[ARRAY_SIZE(fan_attributes)-2] = 8406 - &dev_attr_fan_fan2_input.attr; 8403 + &dev_attr_fan2_input.attr; 8407 8404 } 8408 8405 rc = sysfs_create_group(&tpacpi_sensors_pdev->dev.kobj, 8409 8406 &fan_attr_group); ··· 8851 8848 return snprintf(buf, PAGE_SIZE, "%s\n", TPACPI_NAME); 8852 8849 } 8853 8850 8854 - static DEVICE_ATTR_RO(thinkpad_acpi_pdev_name); 8851 + static DEVICE_ATTR(name, S_IRUGO, thinkpad_acpi_pdev_name_show, NULL); 8855 8852 8856 8853 /* --------------------------------------------------------------------- */ 8857 8854 ··· 9393 9390 hwmon_device_unregister(tpacpi_hwmon); 9394 9391 9395 9392 if (tp_features.sensors_pdev_attrs_registered) 9396 - device_remove_file(&tpacpi_sensors_pdev->dev, 9397 - &dev_attr_thinkpad_acpi_pdev_name); 9393 + device_remove_file(&tpacpi_sensors_pdev->dev, &dev_attr_name); 9398 9394 if (tpacpi_sensors_pdev) 9399 9395 platform_device_unregister(tpacpi_sensors_pdev); 9400 9396 if (tpacpi_pdev) ··· 9514 9512 thinkpad_acpi_module_exit(); 9515 9513 return ret; 9516 9514 } 9517 - ret = device_create_file(&tpacpi_sensors_pdev->dev, 9518 - &dev_attr_thinkpad_acpi_pdev_name); 9515 + ret = device_create_file(&tpacpi_sensors_pdev->dev, &dev_attr_name); 9519 9516 if (ret) { 9520 9517 pr_err("unable to create sysfs hwmon device attributes\n"); 9521 9518 thinkpad_acpi_module_exit();