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

Merge branches 'acpi-misc', 'acpi-cppc', 'acpi-docs', 'acpi-config' and 'acpi-apei'

* acpi-misc:
ACPI: Test for ACPI_SUCCESS rather than !ACPI_FAILURE
ACPI: Use DEVICE_ATTR_<RW|RO|WO> macros

* acpi-cppc:
ACPI: CPPC: initialise vaddr pointers to NULL
ACPI: CPPC: add __iomem annotation to generic_comm_base pointer
ACPI: CPPC: remove __iomem annotation for cpc_reg's address

* acpi-docs:
Documentation: ACPI: add new rule for gpio-line-names

* acpi-config:
ACPI: configfs: add missing check after configfs_register_default_group()

* acpi-apei:
ACPI: APEI: ERST: remove unneeded semicolon
ACPI: APEI: Add is_generic_error() to identify GHES sources

+99 -94
+1
Documentation/firmware-guide/acpi/gpio-properties.rst
··· 146 146 other words, it is not mandatory to fill all the GPIO lines 147 147 - empty names are allowed (two quotation marks ``""`` correspond to an empty 148 148 name) 149 + - names inside one GPIO controller/expander must be unique 149 150 150 151 Example of a GPIO controller of 16 lines, with an incomplete list with two 151 152 empty names::
+6 -1
drivers/acpi/acpi_configfs.c
··· 268 268 269 269 acpi_table_group = configfs_register_default_group(root, "table", 270 270 &acpi_tables_type); 271 - return PTR_ERR_OR_ZERO(acpi_table_group); 271 + if (IS_ERR(acpi_table_group)) { 272 + configfs_unregister_subsystem(&acpi_configfs); 273 + return PTR_ERR(acpi_table_group); 274 + } 275 + 276 + return 0; 272 277 } 273 278 module_init(acpi_configfs_init); 274 279
+9 -15
drivers/acpi/acpi_pad.c
··· 261 261 return ps_tsk_num; 262 262 } 263 263 264 - static ssize_t acpi_pad_rrtime_store(struct device *dev, 264 + static ssize_t rrtime_store(struct device *dev, 265 265 struct device_attribute *attr, const char *buf, size_t count) 266 266 { 267 267 unsigned long num; ··· 275 275 return count; 276 276 } 277 277 278 - static ssize_t acpi_pad_rrtime_show(struct device *dev, 278 + static ssize_t rrtime_show(struct device *dev, 279 279 struct device_attribute *attr, char *buf) 280 280 { 281 281 return scnprintf(buf, PAGE_SIZE, "%d\n", round_robin_time); 282 282 } 283 - static DEVICE_ATTR(rrtime, S_IRUGO|S_IWUSR, 284 - acpi_pad_rrtime_show, 285 - acpi_pad_rrtime_store); 283 + static DEVICE_ATTR_RW(rrtime); 286 284 287 - static ssize_t acpi_pad_idlepct_store(struct device *dev, 285 + static ssize_t idlepct_store(struct device *dev, 288 286 struct device_attribute *attr, const char *buf, size_t count) 289 287 { 290 288 unsigned long num; ··· 296 298 return count; 297 299 } 298 300 299 - static ssize_t acpi_pad_idlepct_show(struct device *dev, 301 + static ssize_t idlepct_show(struct device *dev, 300 302 struct device_attribute *attr, char *buf) 301 303 { 302 304 return scnprintf(buf, PAGE_SIZE, "%d\n", idle_pct); 303 305 } 304 - static DEVICE_ATTR(idlepct, S_IRUGO|S_IWUSR, 305 - acpi_pad_idlepct_show, 306 - acpi_pad_idlepct_store); 306 + static DEVICE_ATTR_RW(idlepct); 307 307 308 - static ssize_t acpi_pad_idlecpus_store(struct device *dev, 308 + static ssize_t idlecpus_store(struct device *dev, 309 309 struct device_attribute *attr, const char *buf, size_t count) 310 310 { 311 311 unsigned long num; ··· 315 319 return count; 316 320 } 317 321 318 - static ssize_t acpi_pad_idlecpus_show(struct device *dev, 322 + static ssize_t idlecpus_show(struct device *dev, 319 323 struct device_attribute *attr, char *buf) 320 324 { 321 325 return cpumap_print_to_pagebuf(false, buf, 322 326 to_cpumask(pad_busy_cpus_bits)); 323 327 } 324 328 325 - static DEVICE_ATTR(idlecpus, S_IRUGO|S_IWUSR, 326 - acpi_pad_idlecpus_show, 327 - acpi_pad_idlecpus_store); 329 + static DEVICE_ATTR_RW(idlecpus); 328 330 329 331 static int acpi_pad_add_sysfs(struct acpi_device *device) 330 332 {
+7 -7
drivers/acpi/acpi_tad.c
··· 237 237 rt.tz, rt.daylight); 238 238 } 239 239 240 - static DEVICE_ATTR(time, S_IRUSR | S_IWUSR, time_show, time_store); 240 + static DEVICE_ATTR_RW(time); 241 241 242 242 static struct attribute *acpi_tad_time_attrs[] = { 243 243 &dev_attr_time.attr, ··· 446 446 return acpi_tad_alarm_read(dev, buf, ACPI_TAD_AC_TIMER); 447 447 } 448 448 449 - static DEVICE_ATTR(ac_alarm, S_IRUSR | S_IWUSR, ac_alarm_show, ac_alarm_store); 449 + static DEVICE_ATTR_RW(ac_alarm); 450 450 451 451 static ssize_t ac_policy_store(struct device *dev, struct device_attribute *attr, 452 452 const char *buf, size_t count) ··· 462 462 return acpi_tad_policy_read(dev, buf, ACPI_TAD_AC_TIMER); 463 463 } 464 464 465 - static DEVICE_ATTR(ac_policy, S_IRUSR | S_IWUSR, ac_policy_show, ac_policy_store); 465 + static DEVICE_ATTR_RW(ac_policy); 466 466 467 467 static ssize_t ac_status_store(struct device *dev, struct device_attribute *attr, 468 468 const char *buf, size_t count) ··· 478 478 return acpi_tad_status_read(dev, buf, ACPI_TAD_AC_TIMER); 479 479 } 480 480 481 - static DEVICE_ATTR(ac_status, S_IRUSR | S_IWUSR, ac_status_show, ac_status_store); 481 + static DEVICE_ATTR_RW(ac_status); 482 482 483 483 static struct attribute *acpi_tad_attrs[] = { 484 484 &dev_attr_caps.attr, ··· 505 505 return acpi_tad_alarm_read(dev, buf, ACPI_TAD_DC_TIMER); 506 506 } 507 507 508 - static DEVICE_ATTR(dc_alarm, S_IRUSR | S_IWUSR, dc_alarm_show, dc_alarm_store); 508 + static DEVICE_ATTR_RW(dc_alarm); 509 509 510 510 static ssize_t dc_policy_store(struct device *dev, struct device_attribute *attr, 511 511 const char *buf, size_t count) ··· 521 521 return acpi_tad_policy_read(dev, buf, ACPI_TAD_DC_TIMER); 522 522 } 523 523 524 - static DEVICE_ATTR(dc_policy, S_IRUSR | S_IWUSR, dc_policy_show, dc_policy_store); 524 + static DEVICE_ATTR_RW(dc_policy); 525 525 526 526 static ssize_t dc_status_store(struct device *dev, struct device_attribute *attr, 527 527 const char *buf, size_t count) ··· 537 537 return acpi_tad_status_read(dev, buf, ACPI_TAD_DC_TIMER); 538 538 } 539 539 540 - static DEVICE_ATTR(dc_status, S_IRUSR | S_IWUSR, dc_status_show, dc_status_store); 540 + static DEVICE_ATTR_RW(dc_status); 541 541 542 542 static struct attribute *acpi_tad_dc_attrs[] = { 543 543 &dev_attr_dc_alarm.attr,
+1 -1
drivers/acpi/apei/erst.c
··· 688 688 break; 689 689 if (erst_timedout(&timeout, SPIN_UNIT)) 690 690 return -EIO; 691 - }; 691 + } 692 692 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); 693 693 if (rc) 694 694 return rc;
+8 -4
drivers/acpi/apei/hest.c
··· 49 49 [ACPI_HEST_TYPE_IA32_DEFERRED_CHECK] = -1, 50 50 }; 51 51 52 + static inline bool is_generic_error(struct acpi_hest_header *hest_hdr) 53 + { 54 + return hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR || 55 + hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR_V2; 56 + } 57 + 52 58 static int hest_esrc_len(struct acpi_hest_header *hest_hdr) 53 59 { 54 60 u16 hest_type = hest_hdr->type; ··· 147 141 { 148 142 int *count = data; 149 143 150 - if (hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR || 151 - hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR_V2) 144 + if (is_generic_error(hest_hdr)) 152 145 (*count)++; 153 146 return 0; 154 147 } ··· 158 153 struct ghes_arr *ghes_arr = data; 159 154 int rc, i; 160 155 161 - if (hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR && 162 - hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR_V2) 156 + if (!is_generic_error(hest_hdr)) 163 157 return 0; 164 158 165 159 if (!((struct acpi_hest_generic *)hest_hdr)->enabled)
+10 -10
drivers/acpi/bgrt.c
··· 15 15 static void *bgrt_image; 16 16 static struct kobject *bgrt_kobj; 17 17 18 - static ssize_t show_version(struct device *dev, 18 + static ssize_t version_show(struct device *dev, 19 19 struct device_attribute *attr, char *buf) 20 20 { 21 21 return snprintf(buf, PAGE_SIZE, "%d\n", bgrt_tab.version); 22 22 } 23 - static DEVICE_ATTR(version, S_IRUGO, show_version, NULL); 23 + static DEVICE_ATTR_RO(version); 24 24 25 - static ssize_t show_status(struct device *dev, 25 + static ssize_t status_show(struct device *dev, 26 26 struct device_attribute *attr, char *buf) 27 27 { 28 28 return snprintf(buf, PAGE_SIZE, "%d\n", bgrt_tab.status); 29 29 } 30 - static DEVICE_ATTR(status, S_IRUGO, show_status, NULL); 30 + static DEVICE_ATTR_RO(status); 31 31 32 - static ssize_t show_type(struct device *dev, 32 + static ssize_t type_show(struct device *dev, 33 33 struct device_attribute *attr, char *buf) 34 34 { 35 35 return snprintf(buf, PAGE_SIZE, "%d\n", bgrt_tab.image_type); 36 36 } 37 - static DEVICE_ATTR(type, S_IRUGO, show_type, NULL); 37 + static DEVICE_ATTR_RO(type); 38 38 39 - static ssize_t show_xoffset(struct device *dev, 39 + static ssize_t xoffset_show(struct device *dev, 40 40 struct device_attribute *attr, char *buf) 41 41 { 42 42 return snprintf(buf, PAGE_SIZE, "%d\n", bgrt_tab.image_offset_x); 43 43 } 44 - static DEVICE_ATTR(xoffset, S_IRUGO, show_xoffset, NULL); 44 + static DEVICE_ATTR_RO(xoffset); 45 45 46 - static ssize_t show_yoffset(struct device *dev, 46 + static ssize_t yoffset_show(struct device *dev, 47 47 struct device_attribute *attr, char *buf) 48 48 { 49 49 return snprintf(buf, PAGE_SIZE, "%d\n", bgrt_tab.image_offset_y); 50 50 } 51 - static DEVICE_ATTR(yoffset, S_IRUGO, show_yoffset, NULL); 51 + static DEVICE_ATTR_RO(yoffset); 52 52 53 53 static ssize_t image_read(struct file *file, struct kobject *kobj, 54 54 struct bin_attribute *attr, char *buf, loff_t off, size_t count)
+4 -4
drivers/acpi/cppc_acpi.c
··· 233 233 { 234 234 int ret = -EIO, i; 235 235 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; 236 - struct acpi_pcct_shared_memory *generic_comm_base = 237 - (struct acpi_pcct_shared_memory *)pcc_ss_data->pcc_comm_addr; 236 + struct acpi_pcct_shared_memory __iomem *generic_comm_base = 237 + pcc_ss_data->pcc_comm_addr; 238 238 unsigned int time_delta; 239 239 240 240 /* ··· 934 934 static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val) 935 935 { 936 936 int ret_val = 0; 937 - void __iomem *vaddr = 0; 937 + void __iomem *vaddr = NULL; 938 938 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); 939 939 struct cpc_reg *reg = &reg_res->cpc_entry.reg; 940 940 ··· 979 979 static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val) 980 980 { 981 981 int ret_val = 0; 982 - void __iomem *vaddr = 0; 982 + void __iomem *vaddr = NULL; 983 983 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); 984 984 struct cpc_reg *reg = &reg_res->cpc_entry.reg; 985 985
+22 -22
drivers/acpi/device_sysfs.c
··· 325 325 EXPORT_SYMBOL_GPL(acpi_device_modalias); 326 326 327 327 static ssize_t 328 - acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, char *buf) 328 + modalias_show(struct device *dev, struct device_attribute *attr, char *buf) 329 329 { 330 330 return __acpi_device_modalias(to_acpi_device(dev), buf, 1024); 331 331 } 332 - static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL); 332 + static DEVICE_ATTR_RO(modalias); 333 333 334 334 static ssize_t real_power_state_show(struct device *dev, 335 335 struct device_attribute *attr, char *buf) ··· 358 358 static DEVICE_ATTR_RO(power_state); 359 359 360 360 static ssize_t 361 - acpi_eject_store(struct device *d, struct device_attribute *attr, 362 - const char *buf, size_t count) 361 + eject_store(struct device *d, struct device_attribute *attr, 362 + const char *buf, size_t count) 363 363 { 364 364 struct acpi_device *acpi_device = to_acpi_device(d); 365 365 acpi_object_type not_used; ··· 387 387 return status == AE_NO_MEMORY ? -ENOMEM : -EAGAIN; 388 388 } 389 389 390 - static DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store); 390 + static DEVICE_ATTR_WO(eject); 391 391 392 392 static ssize_t 393 - acpi_device_hid_show(struct device *dev, struct device_attribute *attr, char *buf) 393 + hid_show(struct device *dev, struct device_attribute *attr, char *buf) 394 394 { 395 395 struct acpi_device *acpi_dev = to_acpi_device(dev); 396 396 397 397 return sprintf(buf, "%s\n", acpi_device_hid(acpi_dev)); 398 398 } 399 - static DEVICE_ATTR(hid, 0444, acpi_device_hid_show, NULL); 399 + static DEVICE_ATTR_RO(hid); 400 400 401 - static ssize_t acpi_device_uid_show(struct device *dev, 402 - struct device_attribute *attr, char *buf) 401 + static ssize_t uid_show(struct device *dev, 402 + struct device_attribute *attr, char *buf) 403 403 { 404 404 struct acpi_device *acpi_dev = to_acpi_device(dev); 405 405 406 406 return sprintf(buf, "%s\n", acpi_dev->pnp.unique_id); 407 407 } 408 - static DEVICE_ATTR(uid, 0444, acpi_device_uid_show, NULL); 408 + static DEVICE_ATTR_RO(uid); 409 409 410 - static ssize_t acpi_device_adr_show(struct device *dev, 411 - struct device_attribute *attr, char *buf) 410 + static ssize_t adr_show(struct device *dev, 411 + struct device_attribute *attr, char *buf) 412 412 { 413 413 struct acpi_device *acpi_dev = to_acpi_device(dev); 414 414 ··· 417 417 else 418 418 return sprintf(buf, "0x%08llx\n", acpi_dev->pnp.bus_address); 419 419 } 420 - static DEVICE_ATTR(adr, 0444, acpi_device_adr_show, NULL); 420 + static DEVICE_ATTR_RO(adr); 421 421 422 - static ssize_t acpi_device_path_show(struct device *dev, 423 - struct device_attribute *attr, char *buf) 422 + static ssize_t path_show(struct device *dev, 423 + struct device_attribute *attr, char *buf) 424 424 { 425 425 struct acpi_device *acpi_dev = to_acpi_device(dev); 426 426 427 427 return acpi_object_path(acpi_dev->handle, buf); 428 428 } 429 - static DEVICE_ATTR(path, 0444, acpi_device_path_show, NULL); 429 + static DEVICE_ATTR_RO(path); 430 430 431 431 /* sysfs file that shows description text from the ACPI _STR method */ 432 432 static ssize_t description_show(struct device *dev, ··· 455 455 static DEVICE_ATTR_RO(description); 456 456 457 457 static ssize_t 458 - acpi_device_sun_show(struct device *dev, struct device_attribute *attr, 459 - char *buf) { 458 + sun_show(struct device *dev, struct device_attribute *attr, 459 + char *buf) { 460 460 struct acpi_device *acpi_dev = to_acpi_device(dev); 461 461 acpi_status status; 462 462 unsigned long long sun; ··· 467 467 468 468 return sprintf(buf, "%llu\n", sun); 469 469 } 470 - static DEVICE_ATTR(sun, 0444, acpi_device_sun_show, NULL); 470 + static DEVICE_ATTR_RO(sun); 471 471 472 472 static ssize_t 473 - acpi_device_hrv_show(struct device *dev, struct device_attribute *attr, 474 - char *buf) { 473 + hrv_show(struct device *dev, struct device_attribute *attr, 474 + char *buf) { 475 475 struct acpi_device *acpi_dev = to_acpi_device(dev); 476 476 acpi_status status; 477 477 unsigned long long hrv; ··· 482 482 483 483 return sprintf(buf, "%llu\n", hrv); 484 484 } 485 - static DEVICE_ATTR(hrv, 0444, acpi_device_hrv_show, NULL); 485 + static DEVICE_ATTR_RO(hrv); 486 486 487 487 static ssize_t status_show(struct device *dev, struct device_attribute *attr, 488 488 char *buf) {
+13 -13
drivers/acpi/dock.c
··· 484 484 /* 485 485 * show_docked - read method for "docked" file in sysfs 486 486 */ 487 - static ssize_t show_docked(struct device *dev, 487 + static ssize_t docked_show(struct device *dev, 488 488 struct device_attribute *attr, char *buf) 489 489 { 490 490 struct dock_station *dock_station = dev->platform_data; ··· 493 493 acpi_bus_get_device(dock_station->handle, &adev); 494 494 return snprintf(buf, PAGE_SIZE, "%u\n", acpi_device_enumerated(adev)); 495 495 } 496 - static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); 496 + static DEVICE_ATTR_RO(docked); 497 497 498 498 /* 499 499 * show_flags - read method for flags file in sysfs 500 500 */ 501 - static ssize_t show_flags(struct device *dev, 501 + static ssize_t flags_show(struct device *dev, 502 502 struct device_attribute *attr, char *buf) 503 503 { 504 504 struct dock_station *dock_station = dev->platform_data; 505 505 return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags); 506 506 507 507 } 508 - static DEVICE_ATTR(flags, S_IRUGO, show_flags, NULL); 508 + static DEVICE_ATTR_RO(flags); 509 509 510 510 /* 511 511 * write_undock - write method for "undock" file in sysfs 512 512 */ 513 - static ssize_t write_undock(struct device *dev, struct device_attribute *attr, 514 - const char *buf, size_t count) 513 + static ssize_t undock_store(struct device *dev, struct device_attribute *attr, 514 + const char *buf, size_t count) 515 515 { 516 516 int ret; 517 517 struct dock_station *dock_station = dev->platform_data; ··· 525 525 acpi_scan_lock_release(); 526 526 return ret ? ret: count; 527 527 } 528 - static DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock); 528 + static DEVICE_ATTR_WO(undock); 529 529 530 530 /* 531 531 * show_dock_uid - read method for "uid" file in sysfs 532 532 */ 533 - static ssize_t show_dock_uid(struct device *dev, 534 - struct device_attribute *attr, char *buf) 533 + static ssize_t uid_show(struct device *dev, 534 + struct device_attribute *attr, char *buf) 535 535 { 536 536 unsigned long long lbuf; 537 537 struct dock_station *dock_station = dev->platform_data; ··· 542 542 543 543 return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf); 544 544 } 545 - static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL); 545 + static DEVICE_ATTR_RO(uid); 546 546 547 - static ssize_t show_dock_type(struct device *dev, 548 - struct device_attribute *attr, char *buf) 547 + static ssize_t type_show(struct device *dev, 548 + struct device_attribute *attr, char *buf) 549 549 { 550 550 struct dock_station *dock_station = dev->platform_data; 551 551 char *type; ··· 561 561 562 562 return snprintf(buf, PAGE_SIZE, "%s\n", type); 563 563 } 564 - static DEVICE_ATTR(type, S_IRUGO, show_dock_type, NULL); 564 + static DEVICE_ATTR_RO(type); 565 565 566 566 static struct attribute *dock_attributes[] = { 567 567 &dev_attr_docked.attr,
+5 -4
drivers/acpi/power.c
··· 886 886 kfree(resource); 887 887 } 888 888 889 - static ssize_t acpi_power_in_use_show(struct device *dev, 890 - struct device_attribute *attr, 891 - char *buf) { 889 + static ssize_t resource_in_use_show(struct device *dev, 890 + struct device_attribute *attr, 891 + char *buf) 892 + { 892 893 struct acpi_power_resource *resource; 893 894 894 895 resource = to_power_resource(to_acpi_device(dev)); 895 896 return sprintf(buf, "%u\n", !!resource->ref_count); 896 897 } 897 - static DEVICE_ATTR(resource_in_use, 0444, acpi_power_in_use_show, NULL); 898 + static DEVICE_ATTR_RO(resource_in_use); 898 899 899 900 static void acpi_power_sysfs_remove(struct acpi_device *device) 900 901 {
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
··· 291 291 continue; 292 292 293 293 status = acpi_get_handle(dhandle, "ATRM", &atrm_handle); 294 - if (!ACPI_FAILURE(status)) { 294 + if (ACPI_SUCCESS(status)) { 295 295 found = true; 296 296 break; 297 297 } ··· 304 304 continue; 305 305 306 306 status = acpi_get_handle(dhandle, "ATRM", &atrm_handle); 307 - if (!ACPI_FAILURE(status)) { 307 + if (ACPI_SUCCESS(status)) { 308 308 found = true; 309 309 break; 310 310 }
+2 -2
drivers/gpu/drm/radeon/radeon_bios.c
··· 205 205 continue; 206 206 207 207 status = acpi_get_handle(dhandle, "ATRM", &atrm_handle); 208 - if (!ACPI_FAILURE(status)) { 208 + if (ACPI_SUCCESS(status)) { 209 209 found = true; 210 210 break; 211 211 } ··· 218 218 continue; 219 219 220 220 status = acpi_get_handle(dhandle, "ATRM", &atrm_handle); 221 - if (!ACPI_FAILURE(status)) { 221 + if (ACPI_SUCCESS(status)) { 222 222 found = true; 223 223 break; 224 224 }
+2 -2
drivers/hwmon/acpi_power_meter.c
··· 161 161 mutex_lock(&resource->lock); 162 162 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_PAI", 163 163 &args, &data); 164 - if (!ACPI_FAILURE(status)) 164 + if (ACPI_SUCCESS(status)) 165 165 resource->avg_interval = temp; 166 166 mutex_unlock(&resource->lock); 167 167 ··· 232 232 mutex_lock(&resource->lock); 233 233 status = acpi_evaluate_integer(resource->acpi_dev->handle, "_SHL", 234 234 &args, &data); 235 - if (!ACPI_FAILURE(status)) 235 + if (ACPI_SUCCESS(status)) 236 236 resource->cap = temp; 237 237 mutex_unlock(&resource->lock); 238 238
+3 -3
drivers/platform/x86/asus-laptop.c
··· 861 861 * The significance of others is yet to be found. 862 862 */ 863 863 rv = acpi_evaluate_integer(asus->handle, "SFUN", NULL, &temp); 864 - if (!ACPI_FAILURE(rv)) 864 + if (ACPI_SUCCESS(rv)) 865 865 len += sprintf(page + len, "SFUN value : %#x\n", 866 866 (uint) temp); 867 867 /* ··· 873 873 * takes several seconds to run on some systems. 874 874 */ 875 875 rv = acpi_evaluate_integer(asus->handle, "HWRS", NULL, &temp); 876 - if (!ACPI_FAILURE(rv)) 876 + if (ACPI_SUCCESS(rv)) 877 877 len += sprintf(page + len, "HWRS value : %#x\n", 878 878 (uint) temp); 879 879 /* ··· 884 884 * silently ignored. 885 885 */ 886 886 rv = acpi_evaluate_integer(asus->handle, "ASYM", NULL, &temp); 887 - if (!ACPI_FAILURE(rv)) 887 + if (ACPI_SUCCESS(rv)) 888 888 len += sprintf(page + len, "ASYM value : %#x\n", 889 889 (uint) temp); 890 890 if (asus->dsdt_info) {
+1 -1
drivers/spi/spi.c
··· 2210 2210 return AE_OK; 2211 2211 2212 2212 if (!lookup.max_speed_hz && 2213 - !ACPI_FAILURE(acpi_get_parent(adev->handle, &parent_handle)) && 2213 + ACPI_SUCCESS(acpi_get_parent(adev->handle, &parent_handle)) && 2214 2214 ACPI_HANDLE(ctlr->dev.parent) == parent_handle) { 2215 2215 /* Apple does not use _CRS but nested devices for SPI slaves */ 2216 2216 acpi_spi_parse_apple_properties(adev, &lookup);
+1 -1
include/acpi/cppc_acpi.h
··· 39 39 u8 bit_width; 40 40 u8 bit_offset; 41 41 u8 access_width; 42 - u64 __iomem address; 42 + u64 address; 43 43 } __packed; 44 44 45 45 /*
+2 -2
sound/pci/hda/hda_intel.c
··· 1444 1444 dhandle = ACPI_HANDLE(&pdev->dev); 1445 1445 if (dhandle) { 1446 1446 status = acpi_get_handle(dhandle, "ATPX", &atpx_handle); 1447 - if (!ACPI_FAILURE(status)) { 1447 + if (ACPI_SUCCESS(status)) { 1448 1448 pci_dev_put(pdev); 1449 1449 return true; 1450 1450 } ··· 1454 1454 dhandle = ACPI_HANDLE(&pdev->dev); 1455 1455 if (dhandle) { 1456 1456 status = acpi_get_handle(dhandle, "ATPX", &atpx_handle); 1457 - if (!ACPI_FAILURE(status)) { 1457 + if (ACPI_SUCCESS(status)) { 1458 1458 pci_dev_put(pdev); 1459 1459 return true; 1460 1460 }