From 8c1fcc61033ebedb3bb33a969b124dd8e2eedc22 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Fri, 8 Sep 2017 11:23:15 +0200 Subject: lib: clean up header includes Just a bit of OCD, I like it when connections within library modules are a bit more obvious. igt.h is ok for tests, but let's use individual include lines for libraries consistently. Also order standard includes before igt ones. v2: Rebase. Acked-by: Jani Nikula Acked-by: Arkadiusz Hiler Acked-by: Petri Latvala Acked-by: Daniel Stone Acked-by: Radoslaw Szwichtenberg Signed-off-by: Daniel Vetter --- lib/igt_alsa.c | 3 ++- lib/igt_alsa.h | 1 - lib/igt_audio.c | 3 ++- lib/igt_audio.h | 1 - lib/igt_chamelium.c | 6 +++++- lib/igt_chamelium.h | 6 +++++- lib/igt_frame.c | 3 ++- lib/igt_frame.h | 1 - lib/igt_gvt.c | 10 +++++----- lib/igt_kmod.c | 6 +++--- lib/igt_sysfs.h | 1 + lib/igt_vgem.c | 10 +++++++--- lib/igt_vgem.h | 1 + 13 files changed, 33 insertions(+), 19 deletions(-) diff --git a/lib/igt_alsa.c b/lib/igt_alsa.c index b5574c76..3ad0521a 100644 --- a/lib/igt_alsa.c +++ b/lib/igt_alsa.c @@ -28,7 +28,8 @@ #include -#include "igt.h" +#include "igt_alsa.h" +#include "igt_core.h" #define HANDLES_MAX 8 diff --git a/lib/igt_alsa.h b/lib/igt_alsa.h index 8f7724ad..50795130 100644 --- a/lib/igt_alsa.h +++ b/lib/igt_alsa.h @@ -29,7 +29,6 @@ #include "config.h" -#include "igt.h" #include struct alsa; diff --git a/lib/igt_audio.c b/lib/igt_audio.c index 6b35529a..2321d1c6 100644 --- a/lib/igt_audio.c +++ b/lib/igt_audio.c @@ -29,7 +29,8 @@ #include #include -#include "igt.h" +#include "igt_audio.h" +#include "igt_core.h" #define FREQS_MAX 8 diff --git a/lib/igt_audio.h b/lib/igt_audio.h index 21adfee8..b3b658a4 100644 --- a/lib/igt_audio.h +++ b/lib/igt_audio.h @@ -29,7 +29,6 @@ #include "config.h" -#include "igt.h" #include struct audio_signal; diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c index dcd8855f..fb250366 100644 --- a/lib/igt_chamelium.c +++ b/lib/igt_chamelium.c @@ -35,7 +35,11 @@ #include #include -#include "igt.h" +#include "igt_chamelium.h" +#include "igt_core.h" +#include "igt_aux.h" +#include "igt_kms.h" +#include "igt_frame.h" /** * SECTION:igt_chamelium diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h index a2d626ec..af9655a0 100644 --- a/lib/igt_chamelium.h +++ b/lib/igt_chamelium.h @@ -28,8 +28,12 @@ #include "config.h" -#include "igt.h" #include +#include + +#include "igt_debugfs.h" + +struct igt_fb; struct chamelium; struct chamelium_port; diff --git a/lib/igt_frame.c b/lib/igt_frame.c index 0f6bca24..6984c02e 100644 --- a/lib/igt_frame.c +++ b/lib/igt_frame.c @@ -32,7 +32,8 @@ #include #include -#include "igt.h" +#include "igt_frame.h" +#include "igt_core.h" /** * SECTION:igt_frame diff --git a/lib/igt_frame.h b/lib/igt_frame.h index 680ad5bb..11f96cbe 100644 --- a/lib/igt_frame.h +++ b/lib/igt_frame.h @@ -29,7 +29,6 @@ #include "config.h" -#include "igt.h" #include bool igt_frame_dump_is_enabled(void); diff --git a/lib/igt_gvt.c b/lib/igt_gvt.c index a78e98e9..acbc3491 100644 --- a/lib/igt_gvt.c +++ b/lib/igt_gvt.c @@ -21,16 +21,16 @@ * IN THE SOFTWARE. */ -#include "igt.h" -#include "igt_gvt.h" -#include "igt_sysfs.h" -#include "igt_kmod.h" - #include #include #include #include +#include "igt_gvt.h" +#include "igt_sysfs.h" +#include "igt_kmod.h" +#include "drmtest.h" + /** * SECTION:igt_gvt * @short_description: Graphics virtualization technology library diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 26691e30..58624cd1 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -21,13 +21,13 @@ * IN THE SOFTWARE. */ -#include "igt.h" +#include +#include + #include "igt_core.h" #include "igt_sysfs.h" #include "igt_kmod.h" -#include - /** * SECTION:igt_kmod * @short_description: Wrappers around libkmod for module loading/unloading diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h index 3ee89b0f..74e61060 100644 --- a/lib/igt_sysfs.h +++ b/lib/igt_sysfs.h @@ -26,6 +26,7 @@ #define __IGT_SYSFS_H__ #include +#include char *igt_sysfs_path(int device, char *path, int pathlen, int *idx); int igt_sysfs_open(int device, int *idx); diff --git a/lib/igt_vgem.c b/lib/igt_vgem.c index 3dd9621d..7f933b23 100644 --- a/lib/igt_vgem.c +++ b/lib/igt_vgem.c @@ -21,10 +21,14 @@ * IN THE SOFTWARE. */ -#include "igt.h" -#include "igt_vgem.h" - #include +#include +#include +#include + +#include "igt_vgem.h" +#include "igt_core.h" +#include "ioctl_wrappers.h" /** * SECTION:igt_vgem diff --git a/lib/igt_vgem.h b/lib/igt_vgem.h index 002ad7f0..92045f0e 100644 --- a/lib/igt_vgem.h +++ b/lib/igt_vgem.h @@ -25,6 +25,7 @@ #define IGT_VGEM_H #include +#include struct vgem_bo { uint32_t handle; -- cgit v1.2.3