summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-05-11 14:29:41 +0400
committerDave Airlie <airlied@redhat.com>2012-05-11 20:35:46 +0400
commita373bedd7e70c1932f3f37d6858f437b69ef01c6 (patch)
tree59c4532640d84a8da89c6cb8b95cfe67fb68e985 /drivers
parentd3029b4e0358e8d3519a290d7e61686ad7e58830 (diff)
downloadlinux-a373bedd7e70c1932f3f37d6858f437b69ef01c6.tar.xz
gma500: Fix build without ACPI
Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/gma500/Makefile3
-rw-r--r--drivers/gpu/drm/gma500/opregion.c6
-rw-r--r--drivers/gpu/drm/gma500/opregion.h22
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.h6
4 files changed, 23 insertions, 14 deletions
diff --git a/drivers/gpu/drm/gma500/Makefile b/drivers/gpu/drm/gma500/Makefile
index dd7d6b57996f..abfa2a93f0d0 100644
--- a/drivers/gpu/drm/gma500/Makefile
+++ b/drivers/gpu/drm/gma500/Makefile
@@ -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 \
diff --git a/drivers/gpu/drm/gma500/opregion.c b/drivers/gpu/drm/gma500/opregion.c
index 05661bfeac75..aa9e89f7e4c2 100644
--- a/drivers/gpu/drm/gma500/opregion.c
+++ b/drivers/gpu/drm/gma500/opregion.c
@@ -21,10 +21,8 @@
* 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;
diff --git a/drivers/gpu/drm/gma500/opregion.h b/drivers/gpu/drm/gma500/opregion.h
index a392ea8908b7..72dc6b921265 100644
--- a/drivers/gpu/drm/gma500/opregion.h
+++ b/drivers/gpu/drm/gma500/opregion.h
@@ -22,8 +22,28 @@
*
*/
+#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
diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h
index 270a27bc936a..309a6427584a 100644
--- a/drivers/gpu/drm/gma500/psb_drv.h
+++ b/drivers/gpu/drm/gma500/psb_drv.h
@@ -808,12 +808,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
*/
extern int psbfb_probed(struct drm_device *dev);