diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_pm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index 0b1caebc6eee..dc8a0cc8e5dc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c | |||
@@ -449,7 +449,7 @@ nouveau_hwmon_fini(struct drm_device *dev) | |||
449 | #endif | 449 | #endif |
450 | } | 450 | } |
451 | 451 | ||
452 | #ifdef CONFIG_ACPI | 452 | #if defined(CONFIG_ACPI) && defined(CONFIG_POWER_SUPPLY) |
453 | static int | 453 | static int |
454 | nouveau_pm_acpi_event(struct notifier_block *nb, unsigned long val, void *data) | 454 | nouveau_pm_acpi_event(struct notifier_block *nb, unsigned long val, void *data) |
455 | { | 455 | { |
@@ -508,7 +508,7 @@ nouveau_pm_init(struct drm_device *dev) | |||
508 | 508 | ||
509 | nouveau_sysfs_init(dev); | 509 | nouveau_sysfs_init(dev); |
510 | nouveau_hwmon_init(dev); | 510 | nouveau_hwmon_init(dev); |
511 | #ifdef CONFIG_ACPI | 511 | #if defined(CONFIG_ACPI) && defined(CONFIG_POWER_SUPPLY) |
512 | pm->acpi_nb.notifier_call = nouveau_pm_acpi_event; | 512 | pm->acpi_nb.notifier_call = nouveau_pm_acpi_event; |
513 | register_acpi_notifier(&pm->acpi_nb); | 513 | register_acpi_notifier(&pm->acpi_nb); |
514 | #endif | 514 | #endif |
@@ -530,7 +530,7 @@ nouveau_pm_fini(struct drm_device *dev) | |||
530 | nouveau_perf_fini(dev); | 530 | nouveau_perf_fini(dev); |
531 | nouveau_volt_fini(dev); | 531 | nouveau_volt_fini(dev); |
532 | 532 | ||
533 | #ifdef CONFIG_ACPI | 533 | #if defined(CONFIG_ACPI) && defined(CONFIG_POWER_SUPPLY) |
534 | unregister_acpi_notifier(&pm->acpi_nb); | 534 | unregister_acpi_notifier(&pm->acpi_nb); |
535 | #endif | 535 | #endif |
536 | nouveau_hwmon_fini(dev); | 536 | nouveau_hwmon_fini(dev); |