Patchwork Fix missing #include hwaccess.h

login
register
about
Submitter Carl-Daniel Hailfinger
Date 2012-08-05 14:49:07
Message ID <501E87E3.4040303@gmx.net>
Download mbox | patch
Permalink /patch/3701/
State Accepted
Commit r1562
Headers show

Comments

Carl-Daniel Hailfinger - 2012-08-05 14:49:07
In r1549 #include "hwaccess.h" was moved to individual drivers.
Unfortunately, flashrom.c was forgotten. This caused flashrom to falsely
report an unknown PCI library version and big-endianness on all platforms.

Add #include "hwaccess.h".
Explicitly check for __FLASHROM_BIG_ENDIAN__

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Patch

Index: flashrom-missing_hwaccess_h_include/flashrom.c
===================================================================
--- flashrom-missing_hwaccess_h_include/flashrom.c	(Revision 1561)
+++ flashrom-missing_hwaccess_h_include/flashrom.c	(Arbeitskopie)
@@ -37,6 +37,7 @@ 
 #include "flash.h"
 #include "flashchips.h"
 #include "programmer.h"
+#include "hwaccess.h"
 
 const char flashrom_version[] = FLASHROM_VERSION;
 char *chip_to_probe = NULL;
@@ -1529,8 +1530,10 @@ 
 #endif
 #if defined (__FLASHROM_LITTLE_ENDIAN__)
 	msg_gdbg(" little endian");
+#elif defined (__FLASHROM_BIG_ENDIAN__)
+	msg_gdbg(" big endian");
 #else
-	msg_gdbg(" big endian");
+#error Endianness could not be determined
 #endif
 	msg_gdbg("\n");
 }