]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
gma500: Fix build without ACPI
authorAlan Cox <alan@linux.intel.com>
Fri, 11 May 2012 10:29:41 +0000 (11:29 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 11 May 2012 16:35:46 +0000 (17:35 +0100)
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/gma500/Makefile
drivers/gpu/drm/gma500/opregion.c
drivers/gpu/drm/gma500/opregion.h
drivers/gpu/drm/gma500/psb_drv.h

index dd7d6b57996fc9af4315bb192cd9848e57f5944a..abfa2a93f0d0326bba0b8d7e14c9c0b69909d56c 100644 (file)
@@ -13,7 +13,6 @@ gma500_gfx-y += gem_glue.o \
          intel_i2c.o \
          intel_gmbus.o \
          mmu.o \
-         opregion.o \
          power.o \
          psb_drv.o \
          psb_intel_display.o \
@@ -25,6 +24,8 @@ gma500_gfx-y += gem_glue.o \
          psb_device.o \
          mid_bios.o
 
+gma500_gfx-$(CONFIG_ACPI) +=  opregion.o \
+
 gma500_gfx-$(CONFIG_DRM_GMA3600) +=  cdv_device.o \
          cdv_intel_crt.o \
          cdv_intel_display.o \
index 05661bfeac75f62e0fb29c29e5109b1a5f77f7ad..aa9e89f7e4c287c88a0f92c316e8323c3079703f 100644 (file)
  * DEALINGS IN THE SOFTWARE.
  *
  */
-#ifdef CONFIG_ACPI
 #include <linux/acpi.h>
 #include <linux/acpi_io.h>
-#endif
 #include "psb_drv.h"
 #include "psb_intel_reg.h"
 
@@ -311,11 +309,7 @@ int psb_intel_opregion_setup(struct drm_device *dev)
                return -ENOTSUPP;
        }
        DRM_DEBUG("OpRegion detected at 0x%8x\n", opregion_phy);
-#ifdef CONFIG_ACPI
        base = acpi_os_ioremap(opregion_phy, 8*1024);
-#else
-       base = ioremap(opregion_phy, 8*1024);
-#endif
        if (!base)
                return -ENOMEM;
 
index a392ea8908b73cda9cd09dbbb2b2e690bfa17305..72dc6b9212656d67a4356149aede32c5691d4e60 100644 (file)
  *
  */
 
+#if defined(CONFIG_ACPI)
 extern void psb_intel_opregion_asle_intr(struct drm_device *dev);
-extern void psb_intel_opregion_enable_asle(struct drm_device *dev);
 extern void psb_intel_opregion_init(struct drm_device *dev);
 extern void psb_intel_opregion_fini(struct drm_device *dev);
 extern int psb_intel_opregion_setup(struct drm_device *dev);
+
+#else
+
+extern inline void psb_intel_opregion_asle_intr(struct drm_device *dev)
+{
+}
+
+extern inline void psb_intel_opregion_init(struct drm_device *dev)
+{
+}
+
+extern inline void psb_intel_opregion_fini(struct drm_device *dev)
+{
+}
+
+extern inline int psb_intel_opregion_setup(struct drm_device *dev)
+{
+       return 0;
+}
+#endif
index 270a27bc936a2b0c9dfcf51a6e28ad0e2b514350..309a6427584ab757ecd48448c75fbd3778de1251 100644 (file)
@@ -807,12 +807,6 @@ psb_disable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask);
 
 extern u32 psb_get_vblank_counter(struct drm_device *dev, int crtc);
 
-/*
- * intel_opregion.c
- */
-extern int gma_intel_opregion_init(struct drm_device *dev);
-extern int gma_intel_opregion_exit(struct drm_device *dev);
-
 /*
  * framebuffer.c
  */