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

Merge tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more ACPI and power management updates from Rafael Wysocki:
"These are regression fixes (leds-gpio, ACPI backlight driver,
operating performance points library, ACPI device enumeration
messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
PM), some cleanups in the operating performance points (OPP)
framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
minor intel_pstate driver changes, a new MAINTAINERS entry for it and
an ACPI fan driver change needed for better support of thermal
management in user space.

Specifics:

- Fix a regression in leds-gpio introduced by a recent commit that
inadvertently changed the name of one of the properties used by the
driver (Fabio Estevam).

- Fix a regression in the ACPI backlight driver introduced by a
recent fix that missed one special case that had to be taken into
account (Aaron Lu).

- Drop the level of some new kernel messages from the ACPI core
introduced by a recent commit to KERN_DEBUG which they should have
used from the start and drop some other unuseful KERN_ERR messages
printed by ACPI (Rafael J Wysocki).

- Revert an incorrect commit modifying the cpupower tool (Prarit
Bhargava).

- Fix two regressions introduced by recent commits in the OPP library
and clean up some existing minor issues in that code (Viresh
Kumar).

- Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
tree (or drop it where that can be done) in order to make it
possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
Hansson, Ludovic Desroches).

There will be one more "CONFIG_PM_RUNTIME removal" batch after this
one, because some new uses of it have been introduced during the
current merge window, but that should be sufficient to finally get
rid of it.

- Make the ACPI EC driver more robust against race conditions related
to GPE handler installation failures (Lv Zheng).

- Prevent the ACPI device PM core code from attempting to disable
GPEs that it has not enabled which confuses ACPICA and makes it
report errors unnecessarily (Rafael J Wysocki).

- Add a "force" command line switch to the intel_pstate driver to
make it possible to override the blacklisting of some systems in
that driver if needed (Ethan Zhao).

- Improve intel_pstate code documentation and add a MAINTAINERS entry
for it (Kristen Carlson Accardi).

- Make the ACPI fan driver create cooling device interfaces witn
names that reflect the IDs of the ACPI device objects they are
associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

That's necessary for user space thermal management tools to be able
to connect the fans with the parts of the system they are supposed
to be cooling properly. From Srinivas Pandruvada"

* tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
MAINTAINERS: add entry for intel_pstate
ACPI / video: update the skip case for acpi_video_device_in_dod()
power / PM: Eliminate CONFIG_PM_RUNTIME
NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
ACPI / EC: Fix unexpected ec_remove_handlers() invocations
Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
ACPI / PM: Do not disable wakeup GPEs that have not been enabled
ACPI / utils: Drop error messages from acpi_evaluate_reference()
...

+199 -156
+9
Documentation/kernel-parameters.txt
··· 1457 1457 disable 1458 1458 Do not enable intel_pstate as the default 1459 1459 scaling driver for the supported processors 1460 + force 1461 + Enable intel_pstate on systems that prohibit it by default 1462 + in favor of acpi-cpufreq. Forcing the intel_pstate driver 1463 + instead of acpi-cpufreq may disable platform features, such 1464 + as thermal controls and power capping, that rely on ACPI 1465 + P-States information being indicated to OSPM and therefore 1466 + should be used with caution. This option does not work with 1467 + processors that aren't supported by the intel_pstate driver 1468 + or on platforms that use pcc-cpufreq instead of acpi-cpufreq. 1460 1469 no_hwp 1461 1470 Do not enable hardware P state control (HWP) 1462 1471 if available.
+6
MAINTAINERS
··· 4963 4963 S: Supported 4964 4964 F: drivers/idle/intel_idle.c 4965 4965 4966 + INTEL PSTATE DRIVER 4967 + M: Kristen Carlson Accardi <kristen@linux.intel.com> 4968 + L: linux-pm@vger.kernel.org 4969 + S: Supported 4970 + F: drivers/cpufreq/intel_pstate.c 4971 + 4966 4972 INTEL FRAMEBUFFER DRIVER (excluding 810 and 815) 4967 4973 M: Maik Broemme <mbroemme@plusserver.de> 4968 4974 L: linux-fbdev@vger.kernel.org
+1 -1
arch/arm/kernel/perf_event.c
··· 484 484 armpmu->stop(armpmu); 485 485 } 486 486 487 - #ifdef CONFIG_PM_RUNTIME 487 + #ifdef CONFIG_PM 488 488 static int armpmu_runtime_resume(struct device *dev) 489 489 { 490 490 struct arm_pmu_platdata *plat = dev_get_platdata(dev);
+1 -1
arch/arm/mach-davinci/pm_domain.c
··· 14 14 #include <linux/pm_clock.h> 15 15 #include <linux/platform_device.h> 16 16 17 - #ifdef CONFIG_PM_RUNTIME 17 + #ifdef CONFIG_PM 18 18 static int davinci_pm_runtime_suspend(struct device *dev) 19 19 { 20 20 int ret;
+1 -1
arch/arm/mach-exynos/Kconfig
··· 21 21 select HAVE_S3C_RTC if RTC_CLASS 22 22 select PINCTRL 23 23 select PINCTRL_EXYNOS 24 - select PM_GENERIC_DOMAINS if PM_RUNTIME 24 + select PM_GENERIC_DOMAINS if PM 25 25 select S5P_DEV_MFC 26 26 select SRAM 27 27 select MFD_SYSCON
+1 -1
arch/arm/mach-keystone/pm_domain.c
··· 19 19 #include <linux/clk-provider.h> 20 20 #include <linux/of.h> 21 21 22 - #ifdef CONFIG_PM_RUNTIME 22 + #ifdef CONFIG_PM 23 23 static int keystone_pm_runtime_suspend(struct device *dev) 24 24 { 25 25 int ret;
+2 -2
arch/arm/mach-omap1/pm_bus.c
··· 21 21 22 22 #include "soc.h" 23 23 24 - #ifdef CONFIG_PM_RUNTIME 24 + #ifdef CONFIG_PM 25 25 static int omap1_pm_runtime_suspend(struct device *dev) 26 26 { 27 27 int ret; ··· 59 59 #define OMAP1_PM_DOMAIN (&default_pm_domain) 60 60 #else 61 61 #define OMAP1_PM_DOMAIN NULL 62 - #endif /* CONFIG_PM_RUNTIME */ 62 + #endif /* CONFIG_PM */ 63 63 64 64 static struct pm_clk_notifier_block platform_bus_notifier = { 65 65 .pm_domain = OMAP1_PM_DOMAIN,
+1 -1
arch/arm/mach-omap2/io.c
··· 361 361 u8 postsetup_state; 362 362 363 363 /* Set the default postsetup state for all hwmods */ 364 - #ifdef CONFIG_PM_RUNTIME 364 + #ifdef CONFIG_PM 365 365 postsetup_state = _HWMOD_STATE_IDLE; 366 366 #else 367 367 postsetup_state = _HWMOD_STATE_ENABLED;
+1 -1
arch/arm/mach-omap2/omap_device.c
··· 588 588 return ERR_PTR(ret); 589 589 } 590 590 591 - #ifdef CONFIG_PM_RUNTIME 591 + #ifdef CONFIG_PM 592 592 static int _od_runtime_suspend(struct device *dev) 593 593 { 594 594 struct platform_device *pdev = to_platform_device(dev);
+1 -1
arch/ia64/Kconfig
··· 231 231 config IA64_HP_SIM 232 232 bool "Ski-simulator" 233 233 select SWIOTLB 234 - depends on !PM_RUNTIME 234 + depends on !PM 235 235 236 236 endchoice 237 237
+1 -1
arch/x86/kernel/apic/io_apic.c
··· 3968 3968 { 3969 3969 if (dev->power.is_prepared) 3970 3970 return true; 3971 - #ifdef CONFIG_PM_RUNTIME 3971 + #ifdef CONFIG_PM 3972 3972 if (dev->power.runtime_status == RPM_SUSPENDING) 3973 3973 return true; 3974 3974 #endif
+10 -2
drivers/acpi/device_pm.c
··· 680 680 if (error) 681 681 return error; 682 682 683 + if (adev->wakeup.flags.enabled) 684 + return 0; 685 + 683 686 res = acpi_enable_gpe(wakeup->gpe_device, wakeup->gpe_number); 684 - if (ACPI_FAILURE(res)) { 687 + if (ACPI_SUCCESS(res)) { 688 + adev->wakeup.flags.enabled = 1; 689 + } else { 685 690 acpi_disable_wakeup_device_power(adev); 686 691 return -EIO; 687 692 } 688 693 } else { 689 - acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number); 694 + if (adev->wakeup.flags.enabled) { 695 + acpi_disable_gpe(wakeup->gpe_device, wakeup->gpe_number); 696 + adev->wakeup.flags.enabled = 0; 697 + } 690 698 acpi_disable_wakeup_device_power(adev); 691 699 } 692 700 return 0;
+2
drivers/acpi/ec.c
··· 844 844 845 845 static void ec_remove_handlers(struct acpi_ec *ec) 846 846 { 847 + if (!test_bit(EC_FLAGS_HANDLERS_INSTALLED, &ec->flags)) 848 + return; 847 849 acpi_disable_gpe(NULL, ec->gpe); 848 850 if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle, 849 851 ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
+7 -1
drivers/acpi/fan.c
··· 325 325 struct thermal_cooling_device *cdev; 326 326 struct acpi_fan *fan; 327 327 struct acpi_device *device = ACPI_COMPANION(&pdev->dev); 328 + char *name; 328 329 329 330 fan = devm_kzalloc(&pdev->dev, sizeof(*fan), GFP_KERNEL); 330 331 if (!fan) { ··· 347 346 } 348 347 } 349 348 350 - cdev = thermal_cooling_device_register("Fan", device, 349 + if (!strncmp(pdev->name, "PNP0C0B", strlen("PNP0C0B"))) 350 + name = "Fan"; 351 + else 352 + name = acpi_device_bid(device); 353 + 354 + cdev = thermal_cooling_device_register(name, device, 351 355 &fan_cooling_ops); 352 356 if (IS_ERR(cdev)) { 353 357 result = PTR_ERR(cdev);
+2 -2
drivers/acpi/scan.c
··· 2214 2214 status = acpi_evaluate_reference(adev->handle, "_DEP", NULL, 2215 2215 &dep_devices); 2216 2216 if (ACPI_FAILURE(status)) { 2217 - dev_err(&adev->dev, "Failed to evaluate _DEP.\n"); 2217 + dev_dbg(&adev->dev, "Failed to evaluate _DEP.\n"); 2218 2218 return; 2219 2219 } 2220 2220 ··· 2224 2224 2225 2225 status = acpi_get_object_info(dep_devices.handles[i], &info); 2226 2226 if (ACPI_FAILURE(status)) { 2227 - dev_err(&adev->dev, "Error reading device info\n"); 2227 + dev_dbg(&adev->dev, "Error reading _DEP device info\n"); 2228 2228 continue; 2229 2229 } 2230 2230
+1 -11
drivers/acpi/utils.c
··· 346 346 package = buffer.pointer; 347 347 348 348 if ((buffer.length == 0) || !package) { 349 - printk(KERN_ERR PREFIX "No return object (len %X ptr %p)\n", 350 - (unsigned)buffer.length, package); 351 349 status = AE_BAD_DATA; 352 350 acpi_util_eval_error(handle, pathname, status); 353 351 goto end; 354 352 } 355 353 if (package->type != ACPI_TYPE_PACKAGE) { 356 - printk(KERN_ERR PREFIX "Expecting a [Package], found type %X\n", 357 - package->type); 358 354 status = AE_BAD_DATA; 359 355 acpi_util_eval_error(handle, pathname, status); 360 356 goto end; 361 357 } 362 358 if (!package->package.count) { 363 - printk(KERN_ERR PREFIX "[Package] has zero elements (%p)\n", 364 - package); 365 359 status = AE_BAD_DATA; 366 360 acpi_util_eval_error(handle, pathname, status); 367 361 goto end; ··· 374 380 375 381 if (element->type != ACPI_TYPE_LOCAL_REFERENCE) { 376 382 status = AE_BAD_DATA; 377 - printk(KERN_ERR PREFIX 378 - "Expecting a [Reference] package element, found type %X\n", 379 - element->type); 380 383 acpi_util_eval_error(handle, pathname, status); 381 384 break; 382 385 } 383 386 384 387 if (!element->reference.handle) { 385 - printk(KERN_WARNING PREFIX "Invalid reference in" 386 - " package %s\n", pathname); 387 388 status = AE_NULL_ENTRY; 389 + acpi_util_eval_error(handle, pathname, status); 388 390 break; 389 391 } 390 392 /* Get the acpi_handle. */
+8 -2
drivers/acpi/video.c
··· 155 155 u8 dos_setting; 156 156 struct acpi_video_enumerated_device *attached_array; 157 157 u8 attached_count; 158 + u8 child_count; 158 159 struct acpi_video_bus_cap cap; 159 160 struct acpi_video_bus_flags flags; 160 161 struct list_head video_device_list; ··· 1160 1159 struct acpi_video_bus *video = device->video; 1161 1160 int i; 1162 1161 1163 - /* If we have a broken _DOD, no need to test */ 1164 - if (!video->attached_count) 1162 + /* 1163 + * If we have a broken _DOD or we have more than 8 output devices 1164 + * under the graphics controller node that we can't proper deal with 1165 + * in the operation region code currently, no need to test. 1166 + */ 1167 + if (!video->attached_count || video->child_count > 8) 1165 1168 return true; 1166 1169 1167 1170 for (i = 0; i < video->attached_count; i++) { ··· 1418 1413 dev_err(&dev->dev, "Can't attach device\n"); 1419 1414 break; 1420 1415 } 1416 + video->child_count++; 1421 1417 } 1422 1418 return status; 1423 1419 }
+1 -1
drivers/ata/Kconfig
··· 61 61 62 62 config SATA_ZPODD 63 63 bool "SATA Zero Power Optical Disc Drive (ZPODD) support" 64 - depends on ATA_ACPI && PM_RUNTIME 64 + depends on ATA_ACPI && PM 65 65 default n 66 66 help 67 67 This option adds support for SATA Zero Power Optical Disc
+44 -34
drivers/base/power/opp.c
··· 84 84 * 85 85 * This is an internal data structure maintaining the link to opps attached to 86 86 * a device. This structure is not meant to be shared to users as it is 87 - * meant for book keeping and private to OPP library 87 + * meant for book keeping and private to OPP library. 88 + * 89 + * Because the opp structures can be used from both rcu and srcu readers, we 90 + * need to wait for the grace period of both of them before freeing any 91 + * resources. And so we have used kfree_rcu() from within call_srcu() handlers. 88 92 */ 89 93 struct device_opp { 90 94 struct list_head node; ··· 386 382 } 387 383 EXPORT_SYMBOL_GPL(dev_pm_opp_find_freq_floor); 388 384 385 + static struct device_opp *add_device_opp(struct device *dev) 386 + { 387 + struct device_opp *dev_opp; 388 + 389 + /* 390 + * Allocate a new device OPP table. In the infrequent case where a new 391 + * device is needed to be added, we pay this penalty. 392 + */ 393 + dev_opp = kzalloc(sizeof(*dev_opp), GFP_KERNEL); 394 + if (!dev_opp) 395 + return NULL; 396 + 397 + dev_opp->dev = dev; 398 + srcu_init_notifier_head(&dev_opp->srcu_head); 399 + INIT_LIST_HEAD(&dev_opp->opp_list); 400 + 401 + /* Secure the device list modification */ 402 + list_add_rcu(&dev_opp->node, &dev_opp_list); 403 + return dev_opp; 404 + } 405 + 389 406 static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq, 390 407 unsigned long u_volt, bool dynamic) 391 408 { 392 409 struct device_opp *dev_opp = NULL; 393 410 struct dev_pm_opp *opp, *new_opp; 394 411 struct list_head *head; 412 + int ret; 395 413 396 414 /* allocate new OPP node */ 397 415 new_opp = kzalloc(sizeof(*new_opp), GFP_KERNEL); ··· 426 400 mutex_lock(&dev_opp_list_lock); 427 401 428 402 /* populate the opp table */ 429 - new_opp->dev_opp = dev_opp; 430 403 new_opp->rate = freq; 431 404 new_opp->u_volt = u_volt; 432 405 new_opp->available = true; ··· 434 409 /* Check for existing list for 'dev' */ 435 410 dev_opp = find_device_opp(dev); 436 411 if (IS_ERR(dev_opp)) { 437 - /* 438 - * Allocate a new device OPP table. In the infrequent case 439 - * where a new device is needed to be added, we pay this 440 - * penalty. 441 - */ 442 - dev_opp = kzalloc(sizeof(struct device_opp), GFP_KERNEL); 412 + dev_opp = add_device_opp(dev); 443 413 if (!dev_opp) { 444 - mutex_unlock(&dev_opp_list_lock); 445 - kfree(new_opp); 446 - dev_warn(dev, 447 - "%s: Unable to create device OPP structure\n", 448 - __func__); 449 - return -ENOMEM; 414 + ret = -ENOMEM; 415 + goto free_opp; 450 416 } 451 417 452 - dev_opp->dev = dev; 453 - srcu_init_notifier_head(&dev_opp->srcu_head); 454 - INIT_LIST_HEAD(&dev_opp->opp_list); 455 - 456 - /* Secure the device list modification */ 457 - list_add_rcu(&dev_opp->node, &dev_opp_list); 458 418 head = &dev_opp->opp_list; 459 419 goto list_add; 460 420 } ··· 458 448 459 449 /* Duplicate OPPs ? */ 460 450 if (new_opp->rate == opp->rate) { 461 - int ret = opp->available && new_opp->u_volt == opp->u_volt ? 451 + ret = opp->available && new_opp->u_volt == opp->u_volt ? 462 452 0 : -EEXIST; 463 453 464 454 dev_warn(dev, "%s: duplicate OPPs detected. Existing: freq: %lu, volt: %lu, enabled: %d. New: freq: %lu, volt: %lu, enabled: %d\n", 465 455 __func__, opp->rate, opp->u_volt, opp->available, 466 456 new_opp->rate, new_opp->u_volt, new_opp->available); 467 - mutex_unlock(&dev_opp_list_lock); 468 - kfree(new_opp); 469 - return ret; 457 + goto free_opp; 470 458 } 471 459 472 460 list_add: 461 + new_opp->dev_opp = dev_opp; 473 462 list_add_rcu(&new_opp->node, head); 474 463 mutex_unlock(&dev_opp_list_lock); 475 464 ··· 478 469 */ 479 470 srcu_notifier_call_chain(&dev_opp->srcu_head, OPP_EVENT_ADD, new_opp); 480 471 return 0; 472 + 473 + free_opp: 474 + mutex_unlock(&dev_opp_list_lock); 475 + kfree(new_opp); 476 + return ret; 481 477 } 482 478 483 479 /** ··· 525 511 { 526 512 struct device_opp *device_opp = container_of(head, struct device_opp, rcu_head); 527 513 528 - kfree(device_opp); 514 + kfree_rcu(device_opp, rcu_head); 529 515 } 530 516 531 - void __dev_pm_opp_remove(struct device_opp *dev_opp, struct dev_pm_opp *opp) 517 + static void __dev_pm_opp_remove(struct device_opp *dev_opp, 518 + struct dev_pm_opp *opp) 532 519 { 533 520 /* 534 521 * Notify the changes in the availability of the operable ··· 607 592 static int opp_set_availability(struct device *dev, unsigned long freq, 608 593 bool availability_req) 609 594 { 610 - struct device_opp *tmp_dev_opp, *dev_opp = ERR_PTR(-ENODEV); 595 + struct device_opp *dev_opp; 611 596 struct dev_pm_opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV); 612 597 int r = 0; 613 598 ··· 621 606 mutex_lock(&dev_opp_list_lock); 622 607 623 608 /* Find the device_opp */ 624 - list_for_each_entry(tmp_dev_opp, &dev_opp_list, node) { 625 - if (dev == tmp_dev_opp->dev) { 626 - dev_opp = tmp_dev_opp; 627 - break; 628 - } 629 - } 609 + dev_opp = find_device_opp(dev); 630 610 if (IS_ERR(dev_opp)) { 631 611 r = PTR_ERR(dev_opp); 632 612 dev_warn(dev, "%s: Device OPP not found (%d)\n", __func__, r); ··· 778 768 */ 779 769 void of_free_opp_table(struct device *dev) 780 770 { 781 - struct device_opp *dev_opp = find_device_opp(dev); 771 + struct device_opp *dev_opp; 782 772 struct dev_pm_opp *opp, *tmp; 783 773 784 774 /* Check for existing list for 'dev' */
+36 -2
drivers/cpufreq/intel_pstate.c
··· 199 199 200 200 pid->integral += fp_error; 201 201 202 - /* limit the integral term */ 202 + /* 203 + * We limit the integral here so that it will never 204 + * get higher than 30. This prevents it from becoming 205 + * too large an input over long periods of time and allows 206 + * it to get factored out sooner. 207 + * 208 + * The value of 30 was chosen through experimentation. 209 + */ 203 210 integral_limit = int_tofp(30); 204 211 if (pid->integral > integral_limit) 205 212 pid->integral = integral_limit; ··· 623 616 if (limits.no_turbo || limits.turbo_disabled) 624 617 max_perf = cpu->pstate.max_pstate; 625 618 619 + /* 620 + * performance can be limited by user through sysfs, by cpufreq 621 + * policy, or by cpu specific default values determined through 622 + * experimentation. 623 + */ 626 624 max_perf_adj = fp_toint(mul_fp(int_tofp(max_perf), limits.max_perf)); 627 625 *max = clamp_t(int, max_perf_adj, 628 626 cpu->pstate.min_pstate, cpu->pstate.turbo_pstate); ··· 729 717 u32 duration_us; 730 718 u32 sample_time; 731 719 720 + /* 721 + * core_busy is the ratio of actual performance to max 722 + * max_pstate is the max non turbo pstate available 723 + * current_pstate was the pstate that was requested during 724 + * the last sample period. 725 + * 726 + * We normalize core_busy, which was our actual percent 727 + * performance to what we requested during the last sample 728 + * period. The result will be a percentage of busy at a 729 + * specified pstate. 730 + */ 732 731 core_busy = cpu->sample.core_pct_busy; 733 732 max_pstate = int_tofp(cpu->pstate.max_pstate); 734 733 current_pstate = int_tofp(cpu->pstate.current_pstate); 735 734 core_busy = mul_fp(core_busy, div_fp(max_pstate, current_pstate)); 736 735 736 + /* 737 + * Since we have a deferred timer, it will not fire unless 738 + * we are in C0. So, determine if the actual elapsed time 739 + * is significantly greater (3x) than our sample interval. If it 740 + * is, then we were idle for a long enough period of time 741 + * to adjust our busyness. 742 + */ 737 743 sample_time = pid_params.sample_rate_ms * USEC_PER_MSEC; 738 744 duration_us = (u32) ktime_us_delta(cpu->sample.time, 739 745 cpu->last_sample_time); ··· 978 948 979 949 static int __initdata no_load; 980 950 static int __initdata no_hwp; 951 + static unsigned int force_load; 981 952 982 953 static int intel_pstate_msrs_not_valid(void) 983 954 { ··· 1125 1094 case PSS: 1126 1095 return intel_pstate_no_acpi_pss(); 1127 1096 case PPC: 1128 - return intel_pstate_has_acpi_ppc(); 1097 + return intel_pstate_has_acpi_ppc() && 1098 + (!force_load); 1129 1099 } 1130 1100 } 1131 1101 ··· 1207 1175 no_load = 1; 1208 1176 if (!strcmp(str, "no_hwp")) 1209 1177 no_hwp = 1; 1178 + if (!strcmp(str, "force")) 1179 + force_load = 1; 1210 1180 return 0; 1211 1181 } 1212 1182 early_param("intel_pstate", intel_pstate_setup);
+1 -1
drivers/leds/leds-gpio.c
··· 203 203 fwnode_property_read_string(child, "linux,default-trigger", 204 204 &led.default_trigger); 205 205 206 - if (!fwnode_property_read_string(child, "linux,default_state", 206 + if (!fwnode_property_read_string(child, "default-state", 207 207 &state)) { 208 208 if (!strcmp(state, "keep")) 209 209 led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
+1 -1
drivers/media/platform/Kconfig
··· 104 104 config VIDEO_S3C_CAMIF 105 105 tristate "Samsung S3C24XX/S3C64XX SoC Camera Interface driver" 106 106 depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API 107 - depends on PM_RUNTIME 107 + depends on PM 108 108 depends on ARCH_S3C64XX || PLAT_S3C24XX || COMPILE_TEST 109 109 depends on HAS_DMA 110 110 select VIDEOBUF2_DMA_CONTIG
+1 -1
drivers/media/platform/s5p-tv/Kconfig
··· 8 8 9 9 config VIDEO_SAMSUNG_S5P_TV 10 10 bool "Samsung TV driver for S5P platform" 11 - depends on PM_RUNTIME 11 + depends on PM 12 12 depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST 13 13 default n 14 14 ---help---
+1 -1
drivers/mmc/host/atmel-mci.c
··· 2561 2561 static const struct dev_pm_ops atmci_dev_pm_ops = { 2562 2562 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 2563 2563 pm_runtime_force_resume) 2564 - SET_PM_RUNTIME_PM_OPS(atmci_runtime_suspend, atmci_runtime_resume, NULL) 2564 + SET_RUNTIME_PM_OPS(atmci_runtime_suspend, atmci_runtime_resume, NULL) 2565 2565 }; 2566 2566 2567 2567 static struct platform_driver atmci_driver = {
+1 -1
drivers/nfc/trf7970a.c
··· 2154 2154 } 2155 2155 #endif 2156 2156 2157 - #ifdef CONFIG_PM_RUNTIME 2157 + #ifdef CONFIG_PM 2158 2158 static int trf7970a_pm_runtime_suspend(struct device *dev) 2159 2159 { 2160 2160 struct spi_device *spi = container_of(dev, struct spi_device, dev);
+1 -1
drivers/phy/phy-omap-usb2.c
··· 318 318 return 0; 319 319 } 320 320 321 - #ifdef CONFIG_PM_RUNTIME 321 + #ifdef CONFIG_PM 322 322 323 323 static int omap_usb2_runtime_suspend(struct device *dev) 324 324 {
+1 -1
drivers/phy/phy-ti-pipe3.c
··· 423 423 return 0; 424 424 } 425 425 426 - #ifdef CONFIG_PM_RUNTIME 426 + #ifdef CONFIG_PM 427 427 428 428 static int ti_pipe3_runtime_suspend(struct device *dev) 429 429 {
-4
drivers/power/pm2301_charger.c
··· 951 951 952 952 #endif 953 953 954 - #ifdef CONFIG_PM_RUNTIME 955 - 956 954 static int pm2xxx_runtime_suspend(struct device *dev) 957 955 { 958 956 struct i2c_client *pm2xxx_i2c_client = to_i2c_client(dev); ··· 974 976 975 977 return 0; 976 978 } 977 - 978 - #endif 979 979 980 980 static const struct dev_pm_ops pm2xxx_pm_ops = { 981 981 SET_SYSTEM_SLEEP_PM_OPS(pm2xxx_wall_charger_suspend,
-10
drivers/scsi/scsi_pm.c
··· 213 213 214 214 #endif /* CONFIG_PM_SLEEP */ 215 215 216 - #ifdef CONFIG_PM_RUNTIME 217 - 218 216 static int sdev_runtime_suspend(struct device *dev) 219 217 { 220 218 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; ··· 329 331 { 330 332 pm_runtime_put_sync(&shost->shost_gendev); 331 333 } 332 - 333 - #else 334 - 335 - #define scsi_runtime_suspend NULL 336 - #define scsi_runtime_resume NULL 337 - #define scsi_runtime_idle NULL 338 - 339 - #endif /* CONFIG_PM_RUNTIME */ 340 334 341 335 const struct dev_pm_ops scsi_bus_pm_ops = { 342 336 .prepare = scsi_bus_prepare,
+2 -3
drivers/scsi/scsi_priv.h
··· 155 155 /* scsi_pm.c */ 156 156 #ifdef CONFIG_PM 157 157 extern const struct dev_pm_ops scsi_bus_pm_ops; 158 - #endif 159 - #ifdef CONFIG_PM_RUNTIME 158 + 160 159 extern void scsi_autopm_get_target(struct scsi_target *); 161 160 extern void scsi_autopm_put_target(struct scsi_target *); 162 161 extern int scsi_autopm_get_host(struct Scsi_Host *); ··· 165 166 static inline void scsi_autopm_put_target(struct scsi_target *t) {} 166 167 static inline int scsi_autopm_get_host(struct Scsi_Host *h) { return 0; } 167 168 static inline void scsi_autopm_put_host(struct Scsi_Host *h) {} 168 - #endif /* CONFIG_PM_RUNTIME */ 169 + #endif /* CONFIG_PM */ 169 170 170 171 extern struct async_domain scsi_sd_pm_domain; 171 172 extern struct async_domain scsi_sd_probe_domain;
+4 -7
drivers/scsi/ufs/ufshcd-pci.c
··· 62 62 { 63 63 return ufshcd_system_resume(dev_get_drvdata(dev)); 64 64 } 65 - #else 66 - #define ufshcd_pci_suspend NULL 67 - #define ufshcd_pci_resume NULL 68 - #endif /* CONFIG_PM */ 69 65 70 - #ifdef CONFIG_PM_RUNTIME 71 66 static int ufshcd_pci_runtime_suspend(struct device *dev) 72 67 { 73 68 return ufshcd_runtime_suspend(dev_get_drvdata(dev)); ··· 75 80 { 76 81 return ufshcd_runtime_idle(dev_get_drvdata(dev)); 77 82 } 78 - #else /* !CONFIG_PM_RUNTIME */ 83 + #else /* !CONFIG_PM */ 84 + #define ufshcd_pci_suspend NULL 85 + #define ufshcd_pci_resume NULL 79 86 #define ufshcd_pci_runtime_suspend NULL 80 87 #define ufshcd_pci_runtime_resume NULL 81 88 #define ufshcd_pci_runtime_idle NULL 82 - #endif /* CONFIG_PM_RUNTIME */ 89 + #endif /* CONFIG_PM */ 83 90 84 91 /** 85 92 * ufshcd_pci_shutdown - main function to put the controller in reset state
+4 -7
drivers/scsi/ufs/ufshcd-pltfrm.c
··· 261 261 { 262 262 return ufshcd_system_resume(dev_get_drvdata(dev)); 263 263 } 264 - #else 265 - #define ufshcd_pltfrm_suspend NULL 266 - #define ufshcd_pltfrm_resume NULL 267 - #endif 268 264 269 - #ifdef CONFIG_PM_RUNTIME 270 265 static int ufshcd_pltfrm_runtime_suspend(struct device *dev) 271 266 { 272 267 return ufshcd_runtime_suspend(dev_get_drvdata(dev)); ··· 274 279 { 275 280 return ufshcd_runtime_idle(dev_get_drvdata(dev)); 276 281 } 277 - #else /* !CONFIG_PM_RUNTIME */ 282 + #else /* !CONFIG_PM */ 283 + #define ufshcd_pltfrm_suspend NULL 284 + #define ufshcd_pltfrm_resume NULL 278 285 #define ufshcd_pltfrm_runtime_suspend NULL 279 286 #define ufshcd_pltfrm_runtime_resume NULL 280 287 #define ufshcd_pltfrm_runtime_idle NULL 281 - #endif /* CONFIG_PM_RUNTIME */ 288 + #endif /* CONFIG_PM */ 282 289 283 290 static void ufshcd_pltfrm_shutdown(struct platform_device *pdev) 284 291 {
+1 -1
drivers/spi/spi-coldfire-qspi.c
··· 491 491 } 492 492 #endif 493 493 494 - #ifdef CONFIG_PM_RUNTIME 494 + #ifdef CONFIG_PM 495 495 static int mcfqspi_runtime_suspend(struct device *dev) 496 496 { 497 497 struct spi_master *master = dev_get_drvdata(dev);
+1 -1
drivers/spi/spi-orion.c
··· 523 523 524 524 MODULE_ALIAS("platform:" DRIVER_NAME); 525 525 526 - #ifdef CONFIG_PM_RUNTIME 526 + #ifdef CONFIG_PM 527 527 static int orion_spi_runtime_suspend(struct device *dev) 528 528 { 529 529 struct spi_master *master = dev_get_drvdata(dev);
+1 -1
drivers/spi/spi-pxa2xx.c
··· 1531 1531 } 1532 1532 #endif 1533 1533 1534 - #ifdef CONFIG_PM_RUNTIME 1534 + #ifdef CONFIG_PM 1535 1535 static int pxa2xx_spi_runtime_suspend(struct device *dev) 1536 1536 { 1537 1537 struct driver_data *drv_data = dev_get_drvdata(dev);
+2 -2
drivers/spi/spi-qup.c
··· 646 646 return ret; 647 647 } 648 648 649 - #ifdef CONFIG_PM_RUNTIME 649 + #ifdef CONFIG_PM 650 650 static int spi_qup_pm_suspend_runtime(struct device *device) 651 651 { 652 652 struct spi_master *master = dev_get_drvdata(device); ··· 672 672 writel_relaxed(config, controller->base + QUP_CONFIG); 673 673 return 0; 674 674 } 675 - #endif /* CONFIG_PM_RUNTIME */ 675 + #endif /* CONFIG_PM */ 676 676 677 677 #ifdef CONFIG_PM_SLEEP 678 678 static int spi_qup_suspend(struct device *device)
+2 -2
drivers/spi/spi-rockchip.c
··· 799 799 } 800 800 #endif /* CONFIG_PM_SLEEP */ 801 801 802 - #ifdef CONFIG_PM_RUNTIME 802 + #ifdef CONFIG_PM 803 803 static int rockchip_spi_runtime_suspend(struct device *dev) 804 804 { 805 805 struct spi_master *master = dev_get_drvdata(dev); ··· 827 827 828 828 return ret; 829 829 } 830 - #endif /* CONFIG_PM_RUNTIME */ 830 + #endif /* CONFIG_PM */ 831 831 832 832 static const struct dev_pm_ops rockchip_spi_pm = { 833 833 SET_SYSTEM_SLEEP_PM_OPS(rockchip_spi_suspend, rockchip_spi_resume)
+2 -2
drivers/spi/spi-s3c64xx.c
··· 1267 1267 } 1268 1268 #endif /* CONFIG_PM_SLEEP */ 1269 1269 1270 - #ifdef CONFIG_PM_RUNTIME 1270 + #ifdef CONFIG_PM 1271 1271 static int s3c64xx_spi_runtime_suspend(struct device *dev) 1272 1272 { 1273 1273 struct spi_master *master = dev_get_drvdata(dev); ··· 1297 1297 1298 1298 return 0; 1299 1299 } 1300 - #endif /* CONFIG_PM_RUNTIME */ 1300 + #endif /* CONFIG_PM */ 1301 1301 1302 1302 static const struct dev_pm_ops s3c64xx_spi_pm = { 1303 1303 SET_SYSTEM_SLEEP_PM_OPS(s3c64xx_spi_suspend, s3c64xx_spi_resume)
+1 -1
drivers/staging/gdm72xx/Kconfig
··· 53 53 54 54 config WIMAX_GDM72XX_USB_PM 55 55 bool "Enable power management support" 56 - depends on PM_RUNTIME 56 + depends on PM 57 57 help 58 58 Enable USB power management in order to reduce power consumption 59 59 while the interface is not in use.
+1 -1
drivers/tty/serial/8250/8250_dw.c
··· 530 530 } 531 531 #endif /* CONFIG_PM_SLEEP */ 532 532 533 - #ifdef CONFIG_PM_RUNTIME 533 + #ifdef CONFIG_PM 534 534 static int dw8250_runtime_suspend(struct device *dev) 535 535 { 536 536 struct dw8250_data *data = dev_get_drvdata(dev);
+1 -1
drivers/tty/serial/8250/8250_mtk.c
··· 244 244 } 245 245 #endif /* CONFIG_PM_SLEEP */ 246 246 247 - #ifdef CONFIG_PM_RUNTIME 247 + #ifdef CONFIG_PM 248 248 static int mtk8250_runtime_suspend(struct device *dev) 249 249 { 250 250 struct mtk8250_data *data = dev_get_drvdata(dev);
+2 -5
drivers/tty/serial/mfd.c
··· 1252 1252 } 1253 1253 return 0; 1254 1254 } 1255 - #else 1256 - #define serial_hsu_suspend NULL 1257 - #define serial_hsu_resume NULL 1258 - #endif 1259 1255 1260 - #ifdef CONFIG_PM_RUNTIME 1261 1256 static int serial_hsu_runtime_idle(struct device *dev) 1262 1257 { 1263 1258 pm_schedule_suspend(dev, 500); ··· 1269 1274 return 0; 1270 1275 } 1271 1276 #else 1277 + #define serial_hsu_suspend NULL 1278 + #define serial_hsu_resume NULL 1272 1279 #define serial_hsu_runtime_idle NULL 1273 1280 #define serial_hsu_runtime_suspend NULL 1274 1281 #define serial_hsu_runtime_resume NULL
+1 -1
drivers/tty/serial/msm_serial_hs.c
··· 1792 1792 } 1793 1793 module_exit(msm_serial_hs_exit); 1794 1794 1795 - #ifdef CONFIG_PM_RUNTIME 1795 + #ifdef CONFIG_PM 1796 1796 static int msm_hs_runtime_idle(struct device *dev) 1797 1797 { 1798 1798 /*
+1 -1
drivers/tty/serial/omap-serial.c
··· 1776 1776 } 1777 1777 } 1778 1778 1779 - #ifdef CONFIG_PM_RUNTIME 1779 + #ifdef CONFIG_PM 1780 1780 static void serial_omap_restore_context(struct uart_omap_port *up) 1781 1781 { 1782 1782 if (up->errata & UART_ERRATA_i202_MDR1_ACCESS)
+1 -1
drivers/usb/core/Kconfig
··· 43 43 44 44 config USB_OTG 45 45 bool "OTG support" 46 - depends on PM_RUNTIME 46 + depends on PM 47 47 default n 48 48 help 49 49 The most notable feature of USB OTG is support for a
+2 -2
drivers/usb/phy/Kconfig
··· 20 20 21 21 config FSL_USB2_OTG 22 22 bool "Freescale USB OTG Transceiver Driver" 23 - depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM_RUNTIME 23 + depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM 24 24 select USB_OTG 25 25 select USB_PHY 26 26 help ··· 153 153 154 154 config USB_MV_OTG 155 155 tristate "Marvell USB OTG support" 156 - depends on USB_EHCI_MV && USB_MV_UDC && PM_RUNTIME 156 + depends on USB_EHCI_MV && USB_MV_UDC && PM 157 157 select USB_OTG 158 158 select USB_PHY 159 159 help
+1 -1
drivers/usb/storage/Kconfig
··· 41 41 42 42 config REALTEK_AUTOPM 43 43 bool "Realtek Card Reader autosuspend support" 44 - depends on USB_STORAGE_REALTEK && PM_RUNTIME 44 + depends on USB_STORAGE_REALTEK && PM 45 45 default y 46 46 47 47 config USB_STORAGE_DATAFAB
+1 -1
drivers/video/fbdev/s3c-fb.c
··· 1630 1630 } 1631 1631 #endif 1632 1632 1633 - #ifdef CONFIG_PM_RUNTIME 1633 + #ifdef CONFIG_PM 1634 1634 static int s3c_fb_runtime_suspend(struct device *dev) 1635 1635 { 1636 1636 struct s3c_fb *sfb = dev_get_drvdata(dev);
+2 -2
drivers/video/fbdev/sh_mobile_meram.c
··· 569 569 * Power management 570 570 */ 571 571 572 - #if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME) 572 + #ifdef CONFIG_PM 573 573 static int sh_mobile_meram_suspend(struct device *dev) 574 574 { 575 575 struct platform_device *pdev = to_platform_device(dev); ··· 612 612 meram_write_reg(priv->base, common_regs[i], priv->regs[i]); 613 613 return 0; 614 614 } 615 - #endif /* CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME */ 615 + #endif /* CONFIG_PM */ 616 616 617 617 static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops, 618 618 sh_mobile_meram_suspend,
+1
include/acpi/acpi_bus.h
··· 313 313 u8 valid:1; /* Can successfully enable wakeup? */ 314 314 u8 run_wake:1; /* Run-Wake GPE devices */ 315 315 u8 notifier_present:1; /* Wake-up notify handler has been installed */ 316 + u8 enabled:1; /* Enabled for wakeup */ 316 317 }; 317 318 318 319 struct acpi_device_wakeup_context {
-2
include/linux/pm.h
··· 351 351 #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) 352 352 #endif 353 353 354 - #define SET_PM_RUNTIME_PM_OPS SET_RUNTIME_PM_OPS 355 - 356 354 /* 357 355 * Use this if you want to use the same suspend and resume callbacks for suspend 358 356 * to RAM and hibernation.
+2 -2
include/scsi/scsi_device.h
··· 441 441 extern void sdev_disable_disk_events(struct scsi_device *sdev); 442 442 extern void sdev_enable_disk_events(struct scsi_device *sdev); 443 443 444 - #ifdef CONFIG_PM_RUNTIME 444 + #ifdef CONFIG_PM 445 445 extern int scsi_autopm_get_device(struct scsi_device *); 446 446 extern void scsi_autopm_put_device(struct scsi_device *); 447 447 #else 448 448 static inline int scsi_autopm_get_device(struct scsi_device *d) { return 0; } 449 449 static inline void scsi_autopm_put_device(struct scsi_device *d) {} 450 - #endif /* CONFIG_PM_RUNTIME */ 450 + #endif /* CONFIG_PM */ 451 451 452 452 static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) 453 453 {
+1 -1
kernel/trace/Makefile
··· 55 55 obj-$(CONFIG_EVENT_TRACING) += trace_events_trigger.o 56 56 obj-$(CONFIG_KPROBE_EVENT) += trace_kprobe.o 57 57 obj-$(CONFIG_TRACEPOINTS) += power-traces.o 58 - ifeq ($(CONFIG_PM_RUNTIME),y) 58 + ifeq ($(CONFIG_PM),y) 59 59 obj-$(CONFIG_TRACEPOINTS) += rpm-traces.o 60 60 endif 61 61 ifeq ($(CONFIG_TRACING),y)
+1 -1
sound/pci/hda/hda_controller.c
··· 1676 1676 u8 sd_status; 1677 1677 int i; 1678 1678 1679 - #ifdef CONFIG_PM_RUNTIME 1679 + #ifdef CONFIG_PM 1680 1680 if (chip->driver_caps & AZX_DCAPS_PM_RUNTIME) 1681 1681 if (!pm_runtime_active(chip->card->dev)) 1682 1682 return IRQ_NONE;
+1 -4
sound/pci/hda/hda_intel.c
··· 872 872 } 873 873 #endif /* CONFIG_PM_SLEEP || SUPPORT_VGA_SWITCHEROO */ 874 874 875 - #ifdef CONFIG_PM_RUNTIME 875 + #ifdef CONFIG_PM 876 876 static int azx_runtime_suspend(struct device *dev) 877 877 { 878 878 struct snd_card *card = dev_get_drvdata(dev); ··· 970 970 return 0; 971 971 } 972 972 973 - #endif /* CONFIG_PM_RUNTIME */ 974 - 975 - #ifdef CONFIG_PM 976 973 static const struct dev_pm_ops azx_pm = { 977 974 SET_SYSTEM_SLEEP_PM_OPS(azx_suspend, azx_resume) 978 975 SET_RUNTIME_PM_OPS(azx_runtime_suspend, azx_runtime_resume, azx_runtime_idle)
+1 -1
sound/soc/codecs/cs35l32.c
··· 550 550 return 0; 551 551 } 552 552 553 - #ifdef CONFIG_PM_RUNTIME 553 + #ifdef CONFIG_PM 554 554 static int cs35l32_runtime_suspend(struct device *dev) 555 555 { 556 556 struct cs35l32_private *cs35l32 = dev_get_drvdata(dev);
+1 -1
sound/soc/codecs/cs42xx8.c
··· 537 537 } 538 538 EXPORT_SYMBOL_GPL(cs42xx8_probe); 539 539 540 - #ifdef CONFIG_PM_RUNTIME 540 + #ifdef CONFIG_PM 541 541 static int cs42xx8_runtime_resume(struct device *dev) 542 542 { 543 543 struct cs42xx8_priv *cs42xx8 = dev_get_drvdata(dev);
+1 -1
sound/soc/codecs/max98090.c
··· 2611 2611 return 0; 2612 2612 } 2613 2613 2614 - #ifdef CONFIG_PM_RUNTIME 2614 + #ifdef CONFIG_PM 2615 2615 static int max98090_runtime_resume(struct device *dev) 2616 2616 { 2617 2617 struct max98090_priv *max98090 = dev_get_drvdata(dev);
+1 -1
sound/soc/codecs/pcm512x.c
··· 517 517 } 518 518 EXPORT_SYMBOL_GPL(pcm512x_remove); 519 519 520 - #ifdef CONFIG_PM_RUNTIME 520 + #ifdef CONFIG_PM 521 521 static int pcm512x_suspend(struct device *dev) 522 522 { 523 523 struct pcm512x_priv *pcm512x = dev_get_drvdata(dev);
+2 -2
sound/soc/codecs/tas2552.c
··· 115 115 {"ClassD", NULL, "PLL"}, 116 116 }; 117 117 118 - #ifdef CONFIG_PM_RUNTIME 118 + #ifdef CONFIG_PM 119 119 static void tas2552_sw_shutdown(struct tas2552_data *tas_data, int sw_shutdown) 120 120 { 121 121 u8 cfg1_reg; ··· 264 264 return 0; 265 265 } 266 266 267 - #ifdef CONFIG_PM_RUNTIME 267 + #ifdef CONFIG_PM 268 268 static int tas2552_runtime_suspend(struct device *dev) 269 269 { 270 270 struct tas2552_data *tas2552 = dev_get_drvdata(dev);
+1 -1
sound/soc/codecs/wm2200.c
··· 2440 2440 return 0; 2441 2441 } 2442 2442 2443 - #ifdef CONFIG_PM_RUNTIME 2443 + #ifdef CONFIG_PM 2444 2444 static int wm2200_runtime_suspend(struct device *dev) 2445 2445 { 2446 2446 struct wm2200_priv *wm2200 = dev_get_drvdata(dev);
+1 -1
sound/soc/codecs/wm5100.c
··· 2664 2664 return 0; 2665 2665 } 2666 2666 2667 - #ifdef CONFIG_PM_RUNTIME 2667 + #ifdef CONFIG_PM 2668 2668 static int wm5100_runtime_suspend(struct device *dev) 2669 2669 { 2670 2670 struct wm5100_priv *wm5100 = dev_get_drvdata(dev);
+1 -1
sound/soc/codecs/wm8962.c
··· 3785 3785 return 0; 3786 3786 } 3787 3787 3788 - #ifdef CONFIG_PM_RUNTIME 3788 + #ifdef CONFIG_PM 3789 3789 static int wm8962_runtime_resume(struct device *dev) 3790 3790 { 3791 3791 struct wm8962_priv *wm8962 = dev_get_drvdata(dev);
+2 -2
sound/soc/fsl/fsl_asrc.c
··· 928 928 return 0; 929 929 } 930 930 931 - #ifdef CONFIG_PM_RUNTIME 931 + #ifdef CONFIG_PM 932 932 static int fsl_asrc_runtime_resume(struct device *dev) 933 933 { 934 934 struct fsl_asrc *asrc_priv = dev_get_drvdata(dev); ··· 954 954 955 955 return 0; 956 956 } 957 - #endif /* CONFIG_PM_RUNTIME */ 957 + #endif /* CONFIG_PM */ 958 958 959 959 #ifdef CONFIG_PM_SLEEP 960 960 static int fsl_asrc_suspend(struct device *dev)
+2 -2
sound/soc/samsung/i2s.c
··· 1135 1135 platform_get_device_id(pdev)->driver_data; 1136 1136 } 1137 1137 1138 - #ifdef CONFIG_PM_RUNTIME 1138 + #ifdef CONFIG_PM 1139 1139 static int i2s_runtime_suspend(struct device *dev) 1140 1140 { 1141 1141 struct i2s_dai *i2s = dev_get_drvdata(dev); ··· 1153 1153 1154 1154 return 0; 1155 1155 } 1156 - #endif /* CONFIG_PM_RUNTIME */ 1156 + #endif /* CONFIG_PM */ 1157 1157 1158 1158 static int samsung_i2s_probe(struct platform_device *pdev) 1159 1159 {
+4 -4
tools/power/cpupower/utils/cpuidle-info.c
··· 22 22 23 23 static void cpuidle_cpu_output(unsigned int cpu, int verbose) 24 24 { 25 - int idlestates, idlestate; 25 + unsigned int idlestates, idlestate; 26 26 char *tmp; 27 27 28 28 printf(_ ("Analyzing CPU %d:\n"), cpu); 29 29 30 30 idlestates = sysfs_get_idlestate_count(cpu); 31 - if (idlestates < 1) { 31 + if (idlestates == 0) { 32 32 printf(_("CPU %u: No idle states\n"), cpu); 33 33 return; 34 34 } ··· 100 100 static void proc_cpuidle_cpu_output(unsigned int cpu) 101 101 { 102 102 long max_allowed_cstate = 2000000000; 103 - int cstate, cstates; 103 + unsigned int cstate, cstates; 104 104 105 105 cstates = sysfs_get_idlestate_count(cpu); 106 - if (cstates < 1) { 106 + if (cstates == 0) { 107 107 printf(_("CPU %u: No C-states info\n"), cpu); 108 108 return; 109 109 }