drm/i915: check for CONFIG_PNP before using pnp function
authorKeith Packard <keithp@keithp.com>
Thu, 11 Jun 2009 02:08:16 +0000 (19:08 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 18 Jun 2009 21:59:11 +0000 (14:59 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/i915_gem_tiling.c

index 5c1ceec49f5b6daf499cb9a984cc3aabaea1bb2c..daeae62e1c28b889eb1a56b1e9d8e6d4963a3dd6 100644 (file)
@@ -114,11 +114,13 @@ intel_alloc_mchbar_resource(struct drm_device *dev)
        mchbar_addr = ((u64)temp_hi << 32) | temp_lo;
 
        /* If ACPI doesn't have it, assume we need to allocate it ourselves */
+#ifdef CONFIG_PNP
        if (mchbar_addr &&
            pnp_range_reserved(mchbar_addr, mchbar_addr + MCHBAR_SIZE)) {
                ret = 0;
                goto out_put;
        }
+#endif
 
        /* Get some space for it */
        ret = pci_bus_alloc_resource(bridge_dev->bus, &dev_priv->mch_res,