drm/i915: Use a symbolic constant for OpRegion lid state
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 24 Feb 2011 18:13:42 +0000 (18:13 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 24 Feb 2011 18:13:42 +0000 (18:13 +0000)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_opregion.c

index 9efccb95fd586e3c701c0bc71b5365b27a50d578..d2c71042290881e71663b4626b36fb4895f92eeb 100644 (file)
@@ -39,6 +39,8 @@
 
 #define OPREGION_HEADER_OFFSET 0
 #define OPREGION_ACPI_OFFSET   0x100
+#define   ACPI_CLID 0x01ac /* current lid state indicator */
+#define   ACPI_CDCK 0x01b0 /* current docking state indicator */
 #define OPREGION_SWSCI_OFFSET  0x200
 #define OPREGION_ASLE_OFFSET   0x300
 #define OPREGION_VBT_OFFSET    0x400
@@ -489,7 +491,7 @@ int intel_opregion_setup(struct drm_device *dev)
        opregion->header = base;
        opregion->vbt = base + OPREGION_VBT_OFFSET;
 
-       opregion->lid_state = base + 0x01ac;
+       opregion->lid_state = base + ACPI_CLID;
 
        mboxes = opregion->header->mboxes;
        if (mboxes & MBOX_ACPI) {