summaryrefslogtreecommitdiff
path: root/tools/intel_lid.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/intel_lid.c')
-rw-r--r--tools/intel_lid.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/intel_lid.c b/tools/intel_lid.c
index 447790d9..37c6ba5e 100644
--- a/tools/intel_lid.c
+++ b/tools/intel_lid.c
@@ -37,10 +37,9 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include "drmtest.h"
-#include "igt_device.h"
#include "intel_io.h"
#include "intel_reg.h"
+#include "intel_chipset.h"
#define SWF14_LID_STATUS_CLOSED (1<<29) /* 0 here means open */
@@ -119,11 +118,8 @@ out:
int main(int argc, char **argv)
{
int swf14, acpi_lid;
- int fd;
- fd = drm_open_driver(DRIVER_INTEL);
- intel_mmio_use_pci_bar(igt_device_get_pci_device(fd));
- close(fd);
+ intel_mmio_use_pci_bar(intel_get_pci_device());
while (1) {
swf14 = INREG(SWF14);
@@ -146,6 +142,5 @@ int main(int argc, char **argv)
}
sleep(2);
}
-
return 0;
}