[Intel-gfx] [PATCH 03/28] lib/intel_chipset: intel_ prefix for pch global

Daniel Vetter daniel.vetter at ffwll.ch
Sun Mar 23 15:18:37 CET 2014


Just a bit better namespacing.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 lib/intel_chipset.c      | 10 +++++-----
 lib/intel_chipset.h      |  8 ++++----
 tools/intel_infoframes.c |  4 ++--
 tools/intel_reg_dumper.c | 10 +++++-----
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/lib/intel_chipset.c b/lib/intel_chipset.c
index e5d2b5bd78d7..8c440cc9c8ba 100644
--- a/lib/intel_chipset.c
+++ b/lib/intel_chipset.c
@@ -40,7 +40,7 @@
 
 #include "intel_chipset.h"
 
-enum pch_type pch;
+enum pch_type intel_pch;
 
 struct pci_device *
 intel_get_pci_device(void)
@@ -148,18 +148,18 @@ intel_check_pch(void)
 
 	switch (pch_dev->device_id & 0xff00) {
 	case 0x3b00:
-		pch = PCH_IBX;
+		intel_pch = PCH_IBX;
 		break;
 	case 0x1c00:
 	case 0x1e00:
-		pch = PCH_CPT;
+		intel_pch = PCH_CPT;
 		break;
 	case 0x8c00:
 	case 0x9c00:
-		pch = PCH_LPT;
+		intel_pch = PCH_LPT;
 		break;
 	default:
-		pch = PCH_NONE;
+		intel_pch = PCH_NONE;
 		return;
 	}
 }
diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h
index f50056f29171..24dfe9455663 100644
--- a/lib/intel_chipset.h
+++ b/lib/intel_chipset.h
@@ -35,7 +35,7 @@ struct pci_device *intel_get_pci_device(void);
 uint32_t intel_get_drm_devid(int fd);
 int intel_gen(uint32_t devid);
 
-extern enum pch_type pch;
+extern enum pch_type intel_pch;
 enum pch_type {
 	PCH_NONE,
 	PCH_IBX,
@@ -45,9 +45,9 @@ enum pch_type {
 
 void intel_check_pch(void);
 
-#define HAS_IBX (pch == PCH_IBX)
-#define HAS_CPT (pch == PCH_CPT)
-#define HAS_LPT (pch == PCH_LPT)
+#define HAS_IBX (intel_pch == PCH_IBX)
+#define HAS_CPT (intel_pch == PCH_CPT)
+#define HAS_LPT (intel_pch == PCH_LPT)
 
 #define PCI_CHIP_I810			0x7121
 #define PCI_CHIP_I810_DC100		0x7123
diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
index c60a87e6f680..81e034337277 100644
--- a/tools/intel_infoframes.c
+++ b/tools/intel_infoframes.c
@@ -367,7 +367,7 @@ static void dump_port_info(int hdmi_port_index)
 
 	if (gen == 4)
 		transcoder = (val & HDMI_PORT_TRANSCODER_GEN4) >> 30;
-	else if (pch >= PCH_CPT)
+	else if (intel_pch >= PCH_CPT)
 		transcoder = (val & HDMI_PORT_TRANSCODER_CPT) >> 29;
 	else
 		transcoder = (val & HDMI_PORT_TRANSCODER_IBX) >> 30;
@@ -1187,7 +1187,7 @@ int main(int argc, char *argv[])
 				transcoder = TRANSC_A;
 			else if (!strcmp(optarg, "B"))
 				transcoder = TRANSC_B;
-			else if (pch >= PCH_CPT && !strcmp(optarg, "C")) {
+			else if (intel_pch >= PCH_CPT && !strcmp(optarg, "C")) {
 				transcoder = TRANSC_C;
 			} else {
 				printf("Invalid transcoder.\n");
diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
index 805b665c46c7..65fe41ebf610 100644
--- a/tools/intel_reg_dumper.c
+++ b/tools/intel_reg_dumper.c
@@ -2931,18 +2931,18 @@ int main(int argc, char** argv)
 		intel_map_file(file);
 		if (devid) {
 			if (IS_GEN5(devid))
-				pch = PCH_IBX;
+				intel_pch = PCH_IBX;
 			else if (IS_GEN6(devid) || IS_IVYBRIDGE(devid))
-				pch = PCH_CPT;
+				intel_pch = PCH_CPT;
 			else if (IS_HASWELL(devid))
-				pch = PCH_LPT;
+				intel_pch = PCH_LPT;
 			else
-				pch = PCH_NONE;
+				intel_pch = PCH_NONE;
 		} else {
 			printf("Dumping from file without -d argument. "
 			       "Assuming Ironlake machine.\n");
 			devid = 0x0042;
-			pch = PCH_IBX;
+			intel_pch = PCH_IBX;
 		}
 	} else {
 		pci_dev = intel_get_pci_device();
-- 
1.8.5.2




More information about the Intel-gfx mailing list