summaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-06-17 20:13:08 +1000
committerPatrick Georgi <patrick@georgi-clan.de>2014-06-25 11:34:05 +0200
commitb57fef9f3e2b3cb8d8c8c5a3552c94a28ff81d15 (patch)
treecbc071f1b5b0f1e9db6458ede866ba76072c86fa /src/ec/google/chromeec
parent0ddb82671cae52571e92b7b22cf088939d887d50 (diff)
src/ec: Sanitize headers and comment #endif pairings
Comment #endif /* FOO */ pairings. Alphabetise headers and remove any #if CONFIG_ guards around them. Background rational: Remove guarding the inclusion of headers based on CONFIG_ options. This *potentially* could hide issues such as functions being swapped from under our feet, since different runtime behaviour could be declared with the same function same name and type-signature. Hence, depending on the header we happen to get may change runtime behaviour. Change-Id: Ic61bdfb64d99f0e2998c6451ae6686915b7bb3d4 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/6059 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/ec/google/chromeec')
-rw-r--r--src/ec/google/chromeec/ec.c3
-rw-r--r--src/ec/google/chromeec/ec_i2c.c1
-rw-r--r--src/ec/google/chromeec/ec_lpc.c8
-rw-r--r--src/ec/google/chromeec/ec_message.h2
-rw-r--r--src/ec/google/chromeec/ec_spi.c1
5 files changed, 8 insertions, 7 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index 6e7ecdfb36..ab4db545fc 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -24,12 +24,11 @@
#include <delay.h>
#include <arch/hlt.h>
#include <reset.h>
-#ifndef __PRE_RAM__
#include <elog.h>
#include <stdlib.h>
#include <string.h>
+
#include "chip.h"
-#endif
#include "ec.h"
#include "ec_commands.h"
diff --git a/src/ec/google/chromeec/ec_i2c.c b/src/ec/google/chromeec/ec_i2c.c
index a13dde6a7b..da11a9612d 100644
--- a/src/ec/google/chromeec/ec_i2c.c
+++ b/src/ec/google/chromeec/ec_i2c.c
@@ -23,6 +23,7 @@
#include <device/i2c.h>
#include <stdint.h>
#include <string.h>
+
#include "ec.h"
#include "ec_commands.h"
diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c
index 8b1cb2ff62..4cd30f3469 100644
--- a/src/ec/google/chromeec/ec_lpc.c
+++ b/src/ec/google/chromeec/ec_lpc.c
@@ -17,14 +17,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <console/console.h>
#include <arch/io.h>
+#include <console/console.h>
#include <delay.h>
#include <device/pnp.h>
#include <pc80/keyboard.h>
+#include <stdint.h>
+#include <stdlib.h>
+
#include "chip.h"
#include "ec.h"
#include "ec_commands.h"
diff --git a/src/ec/google/chromeec/ec_message.h b/src/ec/google/chromeec/ec_message.h
index a2421c7ba4..7e7e51e80d 100644
--- a/src/ec/google/chromeec/ec_message.h
+++ b/src/ec/google/chromeec/ec_message.h
@@ -41,4 +41,4 @@ enum {
MSG_BYTES = EC_HOST_PARAM_SIZE + MSG_PROTO_BYTES,
};
-#endif
+#endif /* _CROS_MESSAGE_H */
diff --git a/src/ec/google/chromeec/ec_spi.c b/src/ec/google/chromeec/ec_spi.c
index 5525e31b1f..cc2c9baba6 100644
--- a/src/ec/google/chromeec/ec_spi.c
+++ b/src/ec/google/chromeec/ec_spi.c
@@ -19,6 +19,7 @@
#include <console/console.h>
#include <spi-generic.h>
+
#include "ec.h"
#include "ec_commands.h"