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

Merge branch 'acpi-misc'

* acpi-misc:
ACPI: dock: fix some coding style issues
ACPI: sysfs: fix some coding style issues
ACPI: PM: add a missed blank line after declarations
ACPI: custom_method: fix a coding style issue
ACPI: CPPC: fix some coding style issues
ACPI: button: fix some coding style issues
ACPI: battery: fix some coding style issues
ACPI: acpi_pad: add a missed blank line after declarations
ACPI: LPSS: add a missed blank line after declarations
ACPI: ipmi: remove useless return statement for void function
ACPI: processor: fix some coding style issues
ACPI: APD: fix a block comment align issue
ACPI: AC: fix some coding style issues
ACPI: fix various typos in comments

+130 -133
+9 -21
drivers/acpi/ac.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 2 /* 3 - * acpi_ac.c - ACPI AC Adapter Driver ($Revision: 27 $) 3 + * acpi_ac.c - ACPI AC Adapter Driver (Revision: 27) 4 4 * 5 5 * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> 6 6 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> ··· 78 78 struct acpi_ac { 79 79 struct power_supply *charger; 80 80 struct power_supply_desc charger_desc; 81 - struct acpi_device * device; 81 + struct acpi_device *device; 82 82 unsigned long long state; 83 83 struct notifier_block battery_nb; 84 84 }; 85 85 86 86 #define to_acpi_ac(x) power_supply_get_drvdata(x) 87 87 88 - /* -------------------------------------------------------------------------- 89 - AC Adapter Management 90 - -------------------------------------------------------------------------- */ 91 - 88 + /* AC Adapter Management */ 92 89 static int acpi_ac_get_state(struct acpi_ac *ac) 93 90 { 94 91 acpi_status status = AE_OK; ··· 106 109 return 0; 107 110 } 108 111 109 - /* -------------------------------------------------------------------------- 110 - sysfs I/F 111 - -------------------------------------------------------------------------- */ 112 + /* sysfs I/F */ 112 113 static int get_ac_property(struct power_supply *psy, 113 114 enum power_supply_property psp, 114 115 union power_supply_propval *val) ··· 133 138 POWER_SUPPLY_PROP_ONLINE, 134 139 }; 135 140 136 - /* -------------------------------------------------------------------------- 137 - Driver Model 138 - -------------------------------------------------------------------------- */ 139 - 141 + /* Driver Model */ 140 142 static void acpi_ac_notify(struct acpi_device *device, u32 event) 141 143 { 142 144 struct acpi_ac *ac = acpi_driver_data(device); ··· 166 174 acpi_notifier_call_chain(device, event, (u32) ac->state); 167 175 kobject_uevent(&ac->charger->dev.kobj, KOBJ_CHANGE); 168 176 } 169 - 170 - return; 171 177 } 172 178 173 179 static int acpi_ac_battery_notify(struct notifier_block *nb, ··· 177 187 /* 178 188 * On HP Pavilion dv6-6179er AC status notifications aren't triggered 179 189 * when adapter is plugged/unplugged. However, battery status 180 - * notifcations are triggered when battery starts charging or 190 + * notifications are triggered when battery starts charging or 181 191 * discharging. Re-reading AC status triggers lost AC notifications, 182 192 * if AC status has changed. 183 193 */ ··· 272 282 ac->battery_nb.notifier_call = acpi_ac_battery_notify; 273 283 register_acpi_notifier(&ac->battery_nb); 274 284 end: 275 - if (result) { 285 + if (result) 276 286 kfree(ac); 277 - } 278 287 279 288 return result; 280 289 } ··· 282 293 static int acpi_ac_resume(struct device *dev) 283 294 { 284 295 struct acpi_ac *ac; 285 - unsigned old_state; 296 + unsigned int old_state; 286 297 287 298 if (!dev) 288 299 return -EINVAL; ··· 341 352 } 342 353 343 354 result = acpi_bus_register_driver(&acpi_ac_driver); 344 - if (result < 0) { 355 + if (result < 0) 345 356 return -ENODEV; 346 - } 347 357 348 358 return 0; 349 359 }
+4 -4
drivers/acpi/acpi_apd.c
··· 176 176 177 177 #endif 178 178 179 - /** 180 - * Create platform device during acpi scan attach handle. 181 - * Return value > 0 on success of creating device. 182 - */ 179 + /* 180 + * Create platform device during acpi scan attach handle. 181 + * Return value > 0 on success of creating device. 182 + */ 183 183 static int acpi_apd_create_device(struct acpi_device *adev, 184 184 const struct acpi_device_id *id) 185 185 {
-1
drivers/acpi/acpi_ipmi.c
··· 478 478 ipmi_dev_release(ipmi_device); 479 479 err_ref: 480 480 put_device(smi_data.dev); 481 - return; 482 481 } 483 482 484 483 static void ipmi_bmc_gone(int iface)
+2
drivers/acpi/acpi_lpss.c
··· 377 377 static int is_memory(struct acpi_resource *res, void *not_used) 378 378 { 379 379 struct resource r; 380 + 380 381 return !acpi_dev_resource_memory(res, &r); 381 382 } 382 383 ··· 1201 1200 if (pdata->dev_desc->resume_from_noirq) { 1202 1201 /* This is analogous to the acpi_lpss_suspend_noirq() case. */ 1203 1202 int ret = acpi_lpss_do_poweroff_late(dev); 1203 + 1204 1204 if (ret) 1205 1205 return ret; 1206 1206 }
+4
drivers/acpi/acpi_pad.c
··· 128 128 static void exit_round_robin(unsigned int tsk_index) 129 129 { 130 130 struct cpumask *pad_busy_cpus = to_cpumask(pad_busy_cpus_bits); 131 + 131 132 cpumask_clear_cpu(tsk_in_cpu[tsk_index], pad_busy_cpus); 132 133 tsk_in_cpu[tsk_index] = -1; 133 134 } ··· 266 265 struct device_attribute *attr, const char *buf, size_t count) 267 266 { 268 267 unsigned long num; 268 + 269 269 if (kstrtoul(buf, 0, &num)) 270 270 return -EINVAL; 271 271 if (num < 1 || num >= 100) ··· 288 286 struct device_attribute *attr, const char *buf, size_t count) 289 287 { 290 288 unsigned long num; 289 + 291 290 if (kstrtoul(buf, 0, &num)) 292 291 return -EINVAL; 293 292 if (num < 1 || num >= 100) ··· 310 307 struct device_attribute *attr, const char *buf, size_t count) 311 308 { 312 309 unsigned long num; 310 + 313 311 if (kstrtoul(buf, 0, &num)) 314 312 return -EINVAL; 315 313 mutex_lock(&isolated_cpus_lock);
+5 -13
drivers/acpi/acpi_processor.c
··· 25 25 DEFINE_PER_CPU(struct acpi_processor *, processors); 26 26 EXPORT_PER_CPU_SYMBOL(processors); 27 27 28 - /* -------------------------------------------------------------------------- 29 - Errata Handling 30 - -------------------------------------------------------------------------- */ 31 - 28 + /* Errata Handling */ 32 29 struct acpi_processor_errata errata __read_mostly; 33 30 EXPORT_SYMBOL_GPL(errata); 34 31 ··· 148 151 return result; 149 152 } 150 153 151 - /* -------------------------------------------------------------------------- 152 - Initialization 153 - -------------------------------------------------------------------------- */ 154 - 154 + /* Initialization */ 155 155 #ifdef CONFIG_ACPI_HOTPLUG_CPU 156 156 int __weak acpi_map_cpu(acpi_handle handle, 157 157 phys_cpuid_t physid, u32 acpi_id, int *pcpu) ··· 300 306 */ 301 307 if (invalid_logical_cpuid(pr->id) || !cpu_present(pr->id)) { 302 308 int ret = acpi_processor_hotadd_init(pr); 309 + 303 310 if (ret) 304 311 return ret; 305 312 } ··· 426 431 } 427 432 428 433 #ifdef CONFIG_ACPI_HOTPLUG_CPU 429 - /* -------------------------------------------------------------------------- 430 - Removal 431 - -------------------------------------------------------------------------- */ 432 - 434 + /* Removal */ 433 435 static void acpi_processor_remove(struct acpi_device *device) 434 436 { 435 437 struct acpi_processor *pr; ··· 884 892 885 893 info->count = last_index; 886 894 887 - end: 895 + end: 888 896 kfree(buffer.pointer); 889 897 890 898 return ret;
+2 -2
drivers/acpi/acpi_video.c
··· 1392 1392 break; 1393 1393 } 1394 1394 } 1395 - /* Ajust level_current to closest available level */ 1395 + /* Adjust level_current to closest available level */ 1396 1396 level_current += delta; 1397 1397 for (i = ACPI_VIDEO_FIRST_LEVEL; i < device->brightness->count; i++) { 1398 1398 l = device->brightness->levels[i]; ··· 1555 1555 1556 1556 /* 1557 1557 * Win8 requires setting bit2 of _DOS to let firmware know it shouldn't 1558 - * preform any automatic brightness change on receiving a notification. 1558 + * perform any automatic brightness change on receiving a notification. 1559 1559 */ 1560 1560 static int acpi_video_bus_start_devices(struct acpi_video_bus *video) 1561 1561 {
+1 -1
drivers/acpi/apei/erst.c
··· 54 54 55 55 static struct acpi_table_erst *erst_tab; 56 56 57 - /* ERST Error Log Address Range atrributes */ 57 + /* ERST Error Log Address Range attributes */ 58 58 #define ERST_RANGE_RESERVED 0x0001 59 59 #define ERST_RANGE_NVRAM 0x0002 60 60 #define ERST_RANGE_SLOW 0x0004
+1 -1
drivers/acpi/apei/hest.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-only 2 2 /* 3 - * APEI Hardware Error Souce Table support 3 + * APEI Hardware Error Source Table support 4 4 * 5 5 * HEST describes error sources in detail; communicates operational 6 6 * parameters (i.e. severity levels, masking bits, and threshold
+34 -29
drivers/acpi/battery.c
··· 74 74 ACPI_BATTERY_XINFO_PRESENT, 75 75 ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, 76 76 /* On Lenovo Thinkpad models from 2010 and 2011, the power unit 77 - switches between mWh and mAh depending on whether the system 78 - is running on battery or not. When mAh is the unit, most 79 - reported values are incorrect and need to be adjusted by 80 - 10000/design_voltage. Verified on x201, t410, t410s, and x220. 81 - Pre-2010 and 2012 models appear to always report in mWh and 82 - are thus unaffected (tested with t42, t61, t500, x200, x300, 83 - and x230). Also, in mid-2012 Lenovo issued a BIOS update for 84 - the 2011 models that fixes the issue (tested on x220 with a 85 - post-1.29 BIOS), but as of Nov. 2012, no such update is 86 - available for the 2010 models. */ 77 + * switches between mWh and mAh depending on whether the system 78 + * is running on battery or not. When mAh is the unit, most 79 + * reported values are incorrect and need to be adjusted by 80 + * 10000/design_voltage. Verified on x201, t410, t410s, and x220. 81 + * Pre-2010 and 2012 models appear to always report in mWh and 82 + * are thus unaffected (tested with t42, t61, t500, x200, x300, 83 + * and x230). Also, in mid-2012 Lenovo issued a BIOS update for 84 + * the 2011 models that fixes the issue (tested on x220 with a 85 + * post-1.29 BIOS), but as of Nov. 2012, no such update is 86 + * available for the 2010 models. 87 + */ 87 88 ACPI_BATTERY_QUIRK_THINKPAD_MAH, 88 89 /* for batteries reporting current capacity with design capacity 89 90 * on a full charge, but showing degradation in full charge cap. ··· 372 371 POWER_SUPPLY_PROP_SERIAL_NUMBER, 373 372 }; 374 373 375 - /* -------------------------------------------------------------------------- 376 - Battery Management 377 - -------------------------------------------------------------------------- */ 374 + /* Battery Management */ 378 375 struct acpi_offsets { 379 376 size_t offset; /* offset inside struct acpi_sbs_battery */ 380 377 u8 mode; /* int or string? */ ··· 430 431 { 431 432 int i; 432 433 union acpi_object *element; 434 + 433 435 if (package->type != ACPI_TYPE_PACKAGE) 434 436 return -EFAULT; 435 437 for (i = 0; i < num; ++i) { ··· 439 439 element = &package->package.elements[i]; 440 440 if (offsets[i].mode) { 441 441 u8 *ptr = (u8 *)battery + offsets[i].offset; 442 + 442 443 if (element->type == ACPI_TYPE_STRING || 443 444 element->type == ACPI_TYPE_BUFFER) 444 445 strncpy(ptr, element->string.pointer, 32); ··· 498 497 battery->design_capacity_warning * 499 498 10000 / battery->design_voltage; 500 499 /* Curiously, design_capacity_low, unlike the rest of them, 501 - is correct. */ 500 + * is correct. 501 + */ 502 502 /* capacity_granularity_* equal 1 on the systems tested, so 503 - it's impossible to tell if they would need an adjustment 504 - or not if their values were higher. */ 503 + * it's impossible to tell if they would need an adjustment 504 + * or not if their values were higher. 505 + */ 505 506 } 506 507 if (test_bit(ACPI_BATTERY_QUIRK_DEGRADED_FULL_CHARGE, &battery->flags) && 507 508 battery->capacity_now > battery->full_charge_capacity) ··· 535 532 if (ACPI_FAILURE(status)) { 536 533 acpi_handle_info(battery->device->handle, 537 534 "%s evaluation failed: %s\n", 538 - use_bix ?"_BIX":"_BIF", 539 - acpi_format_exception(status)); 535 + use_bix ? "_BIX":"_BIF", 536 + acpi_format_exception(status)); 540 537 } else { 541 538 result = extract_battery_info(use_bix, 542 539 battery, ··· 651 648 char *buf) 652 649 { 653 650 struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); 651 + 654 652 return sprintf(buf, "%d\n", battery->alarm * 1000); 655 653 } 656 654 ··· 661 657 { 662 658 unsigned long x; 663 659 struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); 660 + 664 661 if (sscanf(buf, "%lu\n", &x) == 1) 665 662 battery->alarm = x/1000; 666 663 if (acpi_battery_present(battery)) ··· 748 743 * This function gets called right after the battery sysfs 749 744 * attributes have been added, so that the drivers that 750 745 * define custom sysfs attributes can add their own. 751 - */ 746 + */ 752 747 static void battery_hook_add_battery(struct acpi_battery *battery) 753 748 { 754 749 struct acpi_battery_hook *hook_node, *tmp; ··· 877 872 { 878 873 struct acpi_battery *battery = (struct acpi_battery *)private; 879 874 /* Note: the hardcoded offsets below have been extracted from 880 - the source code of dmidecode. */ 875 + * the source code of dmidecode. 876 + */ 881 877 if (dm->type == DMI_ENTRY_PORTABLE_BATTERY && dm->length >= 8) { 882 878 const u8 *dmi_data = (const u8 *)(dm + 1); 883 879 int dmi_capacity = get_unaligned((const u16 *)(dmi_data + 6)); 880 + 884 881 if (dm->length >= 18) 885 882 dmi_capacity *= dmi_data[17]; 886 883 if (battery->design_capacity * battery->design_voltage / 1000 ··· 924 917 925 918 if (battery->power_unit && dmi_name_in_vendors("LENOVO")) { 926 919 const char *s; 920 + 927 921 s = dmi_get_system_info(DMI_PRODUCT_VERSION); 928 922 if (s && !strncasecmp(s, "ThinkPad", 8)) { 929 923 dmi_walk(find_battery, battery); ··· 1021 1013 sysfs_add_battery(battery); 1022 1014 } 1023 1015 1024 - /* -------------------------------------------------------------------------- 1025 - Driver Interface 1026 - -------------------------------------------------------------------------- */ 1027 - 1016 + /* Driver Interface */ 1028 1017 static void acpi_battery_notify(struct acpi_device *device, u32 event) 1029 1018 { 1030 1019 struct acpi_battery *battery = acpi_driver_data(device); ··· 1031 1026 return; 1032 1027 old = battery->bat; 1033 1028 /* 1034 - * On Acer Aspire V5-573G notifications are sometimes triggered too 1035 - * early. For example, when AC is unplugged and notification is 1036 - * triggered, battery state is still reported as "Full", and changes to 1037 - * "Discharging" only after short delay, without any notification. 1038 - */ 1029 + * On Acer Aspire V5-573G notifications are sometimes triggered too 1030 + * early. For example, when AC is unplugged and notification is 1031 + * triggered, battery state is still reported as "Full", and changes to 1032 + * "Discharging" only after short delay, without any notification. 1033 + */ 1039 1034 if (battery_notification_delay_ms > 0) 1040 1035 msleep(battery_notification_delay_ms); 1041 1036 if (event == ACPI_BATTERY_NOTIFY_INFO)
+2 -7
drivers/acpi/button.c
··· 156 156 module_param(lid_report_interval, ulong, 0644); 157 157 MODULE_PARM_DESC(lid_report_interval, "Interval (ms) between lid key events"); 158 158 159 - /* -------------------------------------------------------------------------- 160 - FS Interface (/proc) 161 - -------------------------------------------------------------------------- */ 162 - 159 + /* FS Interface (/proc) */ 163 160 static struct proc_dir_entry *acpi_button_dir; 164 161 static struct proc_dir_entry *acpi_lid_dir; 165 162 ··· 345 348 return 0; 346 349 } 347 350 348 - /* -------------------------------------------------------------------------- 349 - Driver Interface 350 - -------------------------------------------------------------------------- */ 351 + /* Driver Interface */ 351 352 int acpi_lid_open(void) 352 353 { 353 354 if (!lid_device)
+41 -40
drivers/acpi/cppc_acpi.c
··· 100 100 (cpc)->cpc_entry.reg.space_id == \ 101 101 ACPI_ADR_SPACE_PLATFORM_COMM) 102 102 103 - /* Evalutes to True if reg is a NULL register descriptor */ 103 + /* Evaluates to True if reg is a NULL register descriptor */ 104 104 #define IS_NULL_REG(reg) ((reg)->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY && \ 105 105 (reg)->address == 0 && \ 106 106 (reg)->bit_width == 0 && \ 107 107 (reg)->bit_offset == 0 && \ 108 108 (reg)->access_width == 0) 109 109 110 - /* Evalutes to True if an optional cpc field is supported */ 110 + /* Evaluates to True if an optional cpc field is supported */ 111 111 #define CPC_SUPPORTED(cpc) ((cpc)->type == ACPI_TYPE_INTEGER ? \ 112 112 !!(cpc)->cpc_entry.int_value : \ 113 113 !IS_NULL_REG(&(cpc)->cpc_entry.reg)) ··· 318 318 if (unlikely(ret)) { 319 319 for_each_possible_cpu(i) { 320 320 struct cpc_desc *desc = per_cpu(cpc_desc_ptr, i); 321 + 321 322 if (!desc) 322 323 continue; 323 324 ··· 770 769 cpc_ptr->cpc_regs[i-2].type = ACPI_TYPE_BUFFER; 771 770 memcpy(&cpc_ptr->cpc_regs[i-2].cpc_entry.reg, gas_t, sizeof(*gas_t)); 772 771 } else { 773 - pr_debug("Err in entry:%d in CPC table of CPU:%d \n", i, pr->id); 772 + pr_debug("Err in entry:%d in CPC table of CPU:%d\n", i, pr->id); 774 773 goto out_free; 775 774 } 776 775 } ··· 860 859 void __iomem *addr; 861 860 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, pr->id); 862 861 863 - if (pcc_ss_id >=0 && pcc_data[pcc_ss_id]) { 862 + if (pcc_ss_id >= 0 && pcc_data[pcc_ss_id]) { 864 863 if (pcc_data[pcc_ss_id]->pcc_channel_acquired) { 865 864 pcc_data[pcc_ss_id]->refcount--; 866 865 if (!pcc_data[pcc_ss_id]->refcount) { ··· 947 946 val, reg->bit_width); 948 947 949 948 switch (reg->bit_width) { 950 - case 8: 951 - *val = readb_relaxed(vaddr); 952 - break; 953 - case 16: 954 - *val = readw_relaxed(vaddr); 955 - break; 956 - case 32: 957 - *val = readl_relaxed(vaddr); 958 - break; 959 - case 64: 960 - *val = readq_relaxed(vaddr); 961 - break; 962 - default: 963 - pr_debug("Error: Cannot read %u bit width from PCC for ss: %d\n", 964 - reg->bit_width, pcc_ss_id); 965 - ret_val = -EFAULT; 949 + case 8: 950 + *val = readb_relaxed(vaddr); 951 + break; 952 + case 16: 953 + *val = readw_relaxed(vaddr); 954 + break; 955 + case 32: 956 + *val = readl_relaxed(vaddr); 957 + break; 958 + case 64: 959 + *val = readq_relaxed(vaddr); 960 + break; 961 + default: 962 + pr_debug("Error: Cannot read %u bit width from PCC for ss: %d\n", 963 + reg->bit_width, pcc_ss_id); 964 + ret_val = -EFAULT; 966 965 } 967 966 968 967 return ret_val; ··· 986 985 val, reg->bit_width); 987 986 988 987 switch (reg->bit_width) { 989 - case 8: 990 - writeb_relaxed(val, vaddr); 991 - break; 992 - case 16: 993 - writew_relaxed(val, vaddr); 994 - break; 995 - case 32: 996 - writel_relaxed(val, vaddr); 997 - break; 998 - case 64: 999 - writeq_relaxed(val, vaddr); 1000 - break; 1001 - default: 1002 - pr_debug("Error: Cannot write %u bit width to PCC for ss: %d\n", 1003 - reg->bit_width, pcc_ss_id); 1004 - ret_val = -EFAULT; 1005 - break; 988 + case 8: 989 + writeb_relaxed(val, vaddr); 990 + break; 991 + case 16: 992 + writew_relaxed(val, vaddr); 993 + break; 994 + case 32: 995 + writel_relaxed(val, vaddr); 996 + break; 997 + case 64: 998 + writeq_relaxed(val, vaddr); 999 + break; 1000 + default: 1001 + pr_debug("Error: Cannot write %u bit width to PCC for ss: %d\n", 1002 + reg->bit_width, pcc_ss_id); 1003 + ret_val = -EFAULT; 1004 + break; 1006 1005 } 1007 1006 1008 1007 return ret_val; ··· 1322 1321 * is still with OSPM. 1323 1322 * pending_pcc_write_cmd can also be cleared by a different CPU, if 1324 1323 * there was a pcc CMD_READ waiting on down_write and it steals the lock 1325 - * before the pcc CMD_WRITE is completed. pcc_send_cmd checks for this 1324 + * before the pcc CMD_WRITE is completed. send_pcc_cmd checks for this 1326 1325 * case during a CMD_READ and if there are pending writes it delivers 1327 1326 * the write command before servicing the read command 1328 1327 */ ··· 1347 1346 /** 1348 1347 * cppc_get_transition_latency - returns frequency transition latency in ns 1349 1348 * 1350 - * ACPI CPPC does not explicitly specifiy how a platform can specify the 1351 - * transition latency for perfromance change requests. The closest we have 1349 + * ACPI CPPC does not explicitly specify how a platform can specify the 1350 + * transition latency for performance change requests. The closest we have 1352 1351 * is the timing information from the PCCT tables which provides the info 1353 1352 * on the number and frequency of PCC commands the platform can handle. 1354 1353 */
+1 -1
drivers/acpi/custom_method.c
··· 19 19 20 20 /* /sys/kernel/debug/acpi/custom_method */ 21 21 22 - static ssize_t cm_write(struct file *file, const char __user * user_buf, 22 + static ssize_t cm_write(struct file *file, const char __user *user_buf, 23 23 size_t count, loff_t *ppos) 24 24 { 25 25 static char *buf;
+3
drivers/acpi/device_pm.c
··· 966 966 int acpi_subsys_runtime_suspend(struct device *dev) 967 967 { 968 968 int ret = pm_generic_runtime_suspend(dev); 969 + 969 970 return ret ? ret : acpi_dev_suspend(dev, true); 970 971 } 971 972 EXPORT_SYMBOL_GPL(acpi_subsys_runtime_suspend); ··· 981 980 int acpi_subsys_runtime_resume(struct device *dev) 982 981 { 983 982 int ret = acpi_dev_resume(dev); 983 + 984 984 return ret ? ret : pm_generic_runtime_resume(dev); 985 985 } 986 986 EXPORT_SYMBOL_GPL(acpi_subsys_runtime_resume); ··· 1173 1171 int acpi_subsys_restore_early(struct device *dev) 1174 1172 { 1175 1173 int ret = acpi_dev_resume(dev); 1174 + 1176 1175 return ret ? ret : pm_generic_restore_early(dev); 1177 1176 } 1178 1177 EXPORT_SYMBOL_GPL(acpi_subsys_restore_early);
+10 -5
drivers/acpi/device_sysfs.c
··· 73 73 static void acpi_data_node_release(struct kobject *kobj) 74 74 { 75 75 struct acpi_data_node *dn = to_data_node(kobj); 76 + 76 77 complete(&dn->kobj_done); 77 78 } 78 79 ··· 131 130 * Return: 0: no _HID and no _CID 132 131 * -EINVAL: output error 133 132 * -ENOMEM: output is truncated 134 - */ 133 + */ 135 134 static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias, 136 135 int size) 137 136 { ··· 432 431 /* sysfs file that shows description text from the ACPI _STR method */ 433 432 static ssize_t description_show(struct device *dev, 434 433 struct device_attribute *attr, 435 - char *buf) { 434 + char *buf) 435 + { 436 436 struct acpi_device *acpi_dev = to_acpi_device(dev); 437 437 int result; 438 438 ··· 458 456 459 457 static ssize_t 460 458 sun_show(struct device *dev, struct device_attribute *attr, 461 - char *buf) { 459 + char *buf) 460 + { 462 461 struct acpi_device *acpi_dev = to_acpi_device(dev); 463 462 acpi_status status; 464 463 unsigned long long sun; ··· 474 471 475 472 static ssize_t 476 473 hrv_show(struct device *dev, struct device_attribute *attr, 477 - char *buf) { 474 + char *buf) 475 + { 478 476 struct acpi_device *acpi_dev = to_acpi_device(dev); 479 477 acpi_status status; 480 478 unsigned long long hrv; ··· 489 485 static DEVICE_ATTR_RO(hrv); 490 486 491 487 static ssize_t status_show(struct device *dev, struct device_attribute *attr, 492 - char *buf) { 488 + char *buf) 489 + { 493 490 struct acpi_device *acpi_dev = to_acpi_device(dev); 494 491 acpi_status status; 495 492 unsigned long long sta;
+5 -2
drivers/acpi/dock.c
··· 271 271 272 272 if (!acpi_device_enumerated(adev)) { 273 273 int ret = acpi_bus_scan(adev->handle); 274 + 274 275 if (ret) 275 276 dev_dbg(&adev->dev, "scan error %d\n", -ret); 276 277 } ··· 503 502 struct device_attribute *attr, char *buf) 504 503 { 505 504 struct dock_station *dock_station = dev->platform_data; 505 + 506 506 return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags); 507 507 508 508 } ··· 525 523 begin_undock(dock_station); 526 524 ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST); 527 525 acpi_scan_lock_release(); 528 - return ret ? ret: count; 526 + return ret ? ret : count; 529 527 } 530 528 static DEVICE_ATTR_WO(undock); 531 529 ··· 537 535 { 538 536 unsigned long long lbuf; 539 537 struct dock_station *dock_station = dev->platform_data; 538 + 540 539 acpi_status status = acpi_evaluate_integer(dock_station->handle, 541 540 "_UID", NULL, &lbuf); 542 541 if (ACPI_FAILURE(status)) 543 - return 0; 542 + return 0; 544 543 545 544 return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf); 546 545 }
+1 -1
drivers/acpi/numa/hmat.c
··· 722 722 /* 723 723 * Skip offline nodes. This can happen when memory 724 724 * marked EFI_MEMORY_SP, "specific purpose", is applied 725 - * to all the memory in a promixity domain leading to 725 + * to all the memory in a proximity domain leading to 726 726 * the node being marked offline / unplugged, or if 727 727 * memory-only "hotplug" node is offline. 728 728 */
+1 -1
drivers/acpi/pmic/intel_pmic_chtcrc.c
··· 15 15 /* 16 16 * We have no docs for the CHT Crystal Cove PMIC. The Asus Zenfone-2 kernel 17 17 * code has 2 Crystal Cove regulator drivers, one calls the PMIC a "Crystal 18 - * Cove Plus" PMIC and talks about Cherry Trail, so presuambly that one 18 + * Cove Plus" PMIC and talks about Cherry Trail, so presumably that one 19 19 * could be used to get register info for the regulators if we need to 20 20 * implement regulator support in the future. 21 21 *
+1 -1
drivers/acpi/power.c
··· 934 934 strcpy(acpi_device_class(device), ACPI_POWER_CLASS); 935 935 device->power.state = ACPI_STATE_UNKNOWN; 936 936 937 - /* Evalute the object to get the system level and resource order. */ 937 + /* Evaluate the object to get the system level and resource order. */ 938 938 status = acpi_evaluate_object(handle, NULL, NULL, &buffer); 939 939 if (ACPI_FAILURE(status)) 940 940 goto err;
+1 -1
drivers/acpi/processor_perflib.c
··· 96 96 * acpi_processor_ppc_ost: Notify firmware the _PPC evaluation status 97 97 * @handle: ACPI processor handle 98 98 * @status: the status code of _PPC evaluation 99 - * 0: success. OSPM is now using the performance state specificed. 99 + * 0: success. OSPM is now using the performance state specified. 100 100 * 1: failure. OSPM has not changed the number of P-states in use 101 101 */ 102 102 static void acpi_processor_ppc_ost(acpi_handle handle, int status)
+1 -1
drivers/acpi/resource.c
··· 596 596 * @preproc_data: Pointer passed to the caller's preprocessing routine. 597 597 * 598 598 * Evaluate the _CRS method for the given device node and process its output by 599 - * (1) executing the @preproc() rountine provided by the caller, passing the 599 + * (1) executing the @preproc() routine provided by the caller, passing the 600 600 * resource pointer and @preproc_data to it as arguments, for each ACPI resource 601 601 * returned and (2) converting all of the returned ACPI resources into struct 602 602 * resource objects if possible. If the return value of @preproc() in step (1)
+1 -1
drivers/acpi/scan.c
··· 560 560 * prevents attempts to register device objects identical to those being 561 561 * deleted from happening concurrently (such attempts result from 562 562 * hotplug events handled via the ACPI hotplug workqueue). It also will 563 - * run after all of the work items submitted previosuly, which helps 563 + * run after all of the work items submitted previously, which helps 564 564 * those work items to ensure that they are not accessing stale device 565 565 * objects. 566 566 */