summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-08 13:34:44 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-08 13:34:44 -0400
commit6394d6d01bf0881823522f37601cbf880bc61087 (patch)
treee5827ff7dc8b63014d9b068037ce50a5861b0f46 /drivers/platform
parent084861124d00b046cb4159b0158e1b74626b8257 (diff)
parentd4a4f75cd8f29cd9464a5a32e9224a91571d6649 (diff)
Merge 4.1-rc7 into staging-testing
We want the staging tree fixes in here too to help with testing and merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 9bb9ad6d4a1b..28f328136f0d 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2897,7 +2897,7 @@ static ssize_t hotkey_wakeup_reason_show(struct device *dev,
2897 return snprintf(buf, PAGE_SIZE, "%d\n", hotkey_wakeup_reason); 2897 return snprintf(buf, PAGE_SIZE, "%d\n", hotkey_wakeup_reason);
2898} 2898}
2899 2899
2900static DEVICE_ATTR_RO(hotkey_wakeup_reason); 2900static DEVICE_ATTR(wakeup_reason, S_IRUGO, hotkey_wakeup_reason_show, NULL);
2901 2901
2902static void hotkey_wakeup_reason_notify_change(void) 2902static void hotkey_wakeup_reason_notify_change(void)
2903{ 2903{
@@ -2913,7 +2913,8 @@ static ssize_t hotkey_wakeup_hotunplug_complete_show(struct device *dev,
2913 return snprintf(buf, PAGE_SIZE, "%d\n", hotkey_autosleep_ack); 2913 return snprintf(buf, PAGE_SIZE, "%d\n", hotkey_autosleep_ack);
2914} 2914}
2915 2915
2916static DEVICE_ATTR_RO(hotkey_wakeup_hotunplug_complete); 2916static DEVICE_ATTR(wakeup_hotunplug_complete, S_IRUGO,
2917 hotkey_wakeup_hotunplug_complete_show, NULL);
2917 2918
2918static void hotkey_wakeup_hotunplug_complete_notify_change(void) 2919static void hotkey_wakeup_hotunplug_complete_notify_change(void)
2919{ 2920{
@@ -2978,8 +2979,8 @@ static struct attribute *hotkey_attributes[] __initdata = {
2978 &dev_attr_hotkey_enable.attr, 2979 &dev_attr_hotkey_enable.attr,
2979 &dev_attr_hotkey_bios_enabled.attr, 2980 &dev_attr_hotkey_bios_enabled.attr,
2980 &dev_attr_hotkey_bios_mask.attr, 2981 &dev_attr_hotkey_bios_mask.attr,
2981 &dev_attr_hotkey_wakeup_reason.attr, 2982 &dev_attr_wakeup_reason.attr,
2982 &dev_attr_hotkey_wakeup_hotunplug_complete.attr, 2983 &dev_attr_wakeup_hotunplug_complete.attr,
2983 &dev_attr_hotkey_mask.attr, 2984 &dev_attr_hotkey_mask.attr,
2984 &dev_attr_hotkey_all_mask.attr, 2985 &dev_attr_hotkey_all_mask.attr,
2985 &dev_attr_hotkey_recommended_mask.attr, 2986 &dev_attr_hotkey_recommended_mask.attr,
@@ -4393,12 +4394,13 @@ static ssize_t wan_enable_store(struct device *dev,
4393 attr, buf, count); 4394 attr, buf, count);
4394} 4395}
4395 4396
4396static DEVICE_ATTR_RW(wan_enable); 4397static DEVICE_ATTR(wwan_enable, S_IWUSR | S_IRUGO,
4398 wan_enable_show, wan_enable_store);
4397 4399
4398/* --------------------------------------------------------------------- */ 4400/* --------------------------------------------------------------------- */
4399 4401
4400static struct attribute *wan_attributes[] = { 4402static struct attribute *wan_attributes[] = {
4401 &dev_attr_wan_enable.attr, 4403 &dev_attr_wwan_enable.attr,
4402 NULL 4404 NULL
4403}; 4405};
4404 4406
@@ -8138,7 +8140,8 @@ static ssize_t fan_pwm1_enable_store(struct device *dev,
8138 return count; 8140 return count;
8139} 8141}
8140 8142
8141static DEVICE_ATTR_RW(fan_pwm1_enable); 8143static DEVICE_ATTR(pwm1_enable, S_IWUSR | S_IRUGO,
8144 fan_pwm1_enable_show, fan_pwm1_enable_store);
8142 8145
8143/* sysfs fan pwm1 ------------------------------------------------------ */ 8146/* sysfs fan pwm1 ------------------------------------------------------ */
8144static ssize_t fan_pwm1_show(struct device *dev, 8147static ssize_t fan_pwm1_show(struct device *dev,
@@ -8198,7 +8201,7 @@ static ssize_t fan_pwm1_store(struct device *dev,
8198 return (rc) ? rc : count; 8201 return (rc) ? rc : count;
8199} 8202}
8200 8203
8201static DEVICE_ATTR_RW(fan_pwm1); 8204static DEVICE_ATTR(pwm1, S_IWUSR | S_IRUGO, fan_pwm1_show, fan_pwm1_store);
8202 8205
8203/* sysfs fan fan1_input ------------------------------------------------ */ 8206/* sysfs fan fan1_input ------------------------------------------------ */
8204static ssize_t fan_fan1_input_show(struct device *dev, 8207static ssize_t fan_fan1_input_show(struct device *dev,
@@ -8215,7 +8218,7 @@ static ssize_t fan_fan1_input_show(struct device *dev,
8215 return snprintf(buf, PAGE_SIZE, "%u\n", speed); 8218 return snprintf(buf, PAGE_SIZE, "%u\n", speed);
8216} 8219}
8217 8220
8218static DEVICE_ATTR_RO(fan_fan1_input); 8221static DEVICE_ATTR(fan1_input, S_IRUGO, fan_fan1_input_show, NULL);
8219 8222
8220/* sysfs fan fan2_input ------------------------------------------------ */ 8223/* sysfs fan fan2_input ------------------------------------------------ */
8221static ssize_t fan_fan2_input_show(struct device *dev, 8224static ssize_t fan_fan2_input_show(struct device *dev,
@@ -8232,7 +8235,7 @@ static ssize_t fan_fan2_input_show(struct device *dev,
8232 return snprintf(buf, PAGE_SIZE, "%u\n", speed); 8235 return snprintf(buf, PAGE_SIZE, "%u\n", speed);
8233} 8236}
8234 8237
8235static DEVICE_ATTR_RO(fan_fan2_input); 8238static DEVICE_ATTR(fan2_input, S_IRUGO, fan_fan2_input_show, NULL);
8236 8239
8237/* sysfs fan fan_watchdog (hwmon driver) ------------------------------- */ 8240/* sysfs fan fan_watchdog (hwmon driver) ------------------------------- */
8238static ssize_t fan_fan_watchdog_show(struct device_driver *drv, 8241static ssize_t fan_fan_watchdog_show(struct device_driver *drv,
@@ -8265,8 +8268,8 @@ static DRIVER_ATTR(fan_watchdog, S_IWUSR | S_IRUGO,
8265 8268
8266/* --------------------------------------------------------------------- */ 8269/* --------------------------------------------------------------------- */
8267static struct attribute *fan_attributes[] = { 8270static struct attribute *fan_attributes[] = {
8268 &dev_attr_fan_pwm1_enable.attr, &dev_attr_fan_pwm1.attr, 8271 &dev_attr_pwm1_enable.attr, &dev_attr_pwm1.attr,
8269 &dev_attr_fan_fan1_input.attr, 8272 &dev_attr_fan1_input.attr,
8270 NULL, /* for fan2_input */ 8273 NULL, /* for fan2_input */
8271 NULL 8274 NULL
8272}; 8275};
@@ -8400,7 +8403,7 @@ static int __init fan_init(struct ibm_init_struct *iibm)
8400 if (tp_features.second_fan) { 8403 if (tp_features.second_fan) {
8401 /* attach second fan tachometer */ 8404 /* attach second fan tachometer */
8402 fan_attributes[ARRAY_SIZE(fan_attributes)-2] = 8405 fan_attributes[ARRAY_SIZE(fan_attributes)-2] =
8403 &dev_attr_fan_fan2_input.attr; 8406 &dev_attr_fan2_input.attr;
8404 } 8407 }
8405 rc = sysfs_create_group(&tpacpi_sensors_pdev->dev.kobj, 8408 rc = sysfs_create_group(&tpacpi_sensors_pdev->dev.kobj,
8406 &fan_attr_group); 8409 &fan_attr_group);
@@ -8848,7 +8851,7 @@ static ssize_t thinkpad_acpi_pdev_name_show(struct device *dev,
8848 return snprintf(buf, PAGE_SIZE, "%s\n", TPACPI_NAME); 8851 return snprintf(buf, PAGE_SIZE, "%s\n", TPACPI_NAME);
8849} 8852}
8850 8853
8851static DEVICE_ATTR_RO(thinkpad_acpi_pdev_name); 8854static DEVICE_ATTR(name, S_IRUGO, thinkpad_acpi_pdev_name_show, NULL);
8852 8855
8853/* --------------------------------------------------------------------- */ 8856/* --------------------------------------------------------------------- */
8854 8857
@@ -9390,8 +9393,7 @@ static void thinkpad_acpi_module_exit(void)
9390 hwmon_device_unregister(tpacpi_hwmon); 9393 hwmon_device_unregister(tpacpi_hwmon);
9391 9394
9392 if (tp_features.sensors_pdev_attrs_registered) 9395 if (tp_features.sensors_pdev_attrs_registered)
9393 device_remove_file(&tpacpi_sensors_pdev->dev, 9396 device_remove_file(&tpacpi_sensors_pdev->dev, &dev_attr_name);
9394 &dev_attr_thinkpad_acpi_pdev_name);
9395 if (tpacpi_sensors_pdev) 9397 if (tpacpi_sensors_pdev)
9396 platform_device_unregister(tpacpi_sensors_pdev); 9398 platform_device_unregister(tpacpi_sensors_pdev);
9397 if (tpacpi_pdev) 9399 if (tpacpi_pdev)
@@ -9512,8 +9514,7 @@ static int __init thinkpad_acpi_module_init(void)
9512 thinkpad_acpi_module_exit(); 9514 thinkpad_acpi_module_exit();
9513 return ret; 9515 return ret;
9514 } 9516 }
9515 ret = device_create_file(&tpacpi_sensors_pdev->dev, 9517 ret = device_create_file(&tpacpi_sensors_pdev->dev, &dev_attr_name);
9516 &dev_attr_thinkpad_acpi_pdev_name);
9517 if (ret) { 9518 if (ret) {
9518 pr_err("unable to create sysfs hwmon device attributes\n"); 9519 pr_err("unable to create sysfs hwmon device attributes\n");
9519 thinkpad_acpi_module_exit(); 9520 thinkpad_acpi_module_exit();