i915 build error if !CONFIG_ACPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CC [M]  drivers/gpu/drm/i915/i915_opregion.o
/usr/src/linux-2.6/drivers/gpu/drm/i915/i915_opregion.c: In function
'intel_opregion_init':
/usr/src/linux-2.6/drivers/gpu/drm/i915/i915_opregion.c:340: error:
implicit declaration of function 'register_acpi_notifier'
/usr/src/linux-2.6/drivers/gpu/drm/i915/i915_opregion.c: In function
'intel_opregion_free':
/usr/src/linux-2.6/drivers/gpu/drm/i915/i915_opregion.c:361: error:
implicit declaration of function 'unregister_acpi_notifier'

How about below fix?
---

    fix build error if !CONFIG_ACPI

    Signed-off-by Lin Ming <lin@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_opregion.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_opregion.c
b/drivers/gpu/drm/i915/i915_opregion.c
index 1787a0c..9e51522 100644
--- a/drivers/gpu/drm/i915/i915_opregion.c
+++ b/drivers/gpu/drm/i915/i915_opregion.c
@@ -25,7 +25,9 @@
  *
  */

+#ifdef CONFIG_ACPI
 #include <linux/acpi.h>
+#endif

 #include "drmP.h"
 #include "i915_drm.h"
@@ -280,9 +282,11 @@ int intel_opregion_video_event(struct
notifier_block *nb, unsigned long val,
 	return NOTIFY_OK;
 }

+#ifdef CONFIG_ACPI
 static struct notifier_block intel_opregion_notifier = {
 	.notifier_call = intel_opregion_video_event,
 };
+#endif

 int intel_opregion_init(struct drm_device *dev)
 {
@@ -337,7 +341,9 @@ int intel_opregion_init(struct drm_device *dev)
 	opregion->acpi->drdy = 1;

 	system_opregion = opregion;
+#ifdef CONFIG_ACPI
 	register_acpi_notifier(&intel_opregion_notifier);
+#endif

 	return 0;

@@ -358,7 +364,9 @@ void intel_opregion_free(struct drm_device *dev)
 	opregion->acpi->drdy = 0;

 	system_opregion = NULL;
+#ifdef CONFIG_ACPI
 	unregister_acpi_notifier(&intel_opregion_notifier);
+#endif

 	/* just clear all opregion memory pointers now */
 	iounmap(opregion->header);

Attachment: myconfig
Description: Binary data


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux