[2/2] cros_ec: Deprecate "gec" in favor of "cros_ec"

This patch does the following:
- sed -i 's/gec/cros_ec/g' *.c *.h
- sed -i 's/GEC/CROS_EC/g' *.c *.h

The renaming should pretty much all be trivial. There were two minor
exceptions:
- Renamed GECLOCK to CROS_EC_LOCK (instead of CROS_ECLOCK)
- Split a >80 cols line in cros_ec_lpc.c

BUG=none
BRANCH=none
TEST=built and ran "flashrom -p host --flash-name" and 'flashrom -p ec
    --flash-name" on peppy (LPC), snow, and nyan_blaze. Chips
    identified properly.

Change-Id: I28bfa8be8fd9bb1671dbbffb8c9c8ef185be0521
Reviewed-on: https://chromium-review.googlesource.com/211955
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
diff --git a/flashrom.c b/flashrom.c
index 3297ec8..6030c69 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -2019,8 +2019,8 @@
 
 	if (write_it) {
 		// parse the new fmap
-		if ((ret = gec_prepare(newcontents, size))) {
-			msg_cerr("GEC prepare failed, ret=%d.\n", ret);
+		if ((ret = cros_ec_prepare(newcontents, size))) {
+			msg_cerr("CROS_EC prepare failed, ret=%d.\n", ret);
 			goto out;
 		}
 
@@ -2041,16 +2041,16 @@
 			goto out;
 		}
 
-		ret = gec_need_2nd_pass();
+		ret = cros_ec_need_2nd_pass();
 		if (ret < 0) {
 			// Jump failed
-			msg_cerr("gec_need_2nd_pass() failed. Stop.\n");
+			msg_cerr("cros_ec_need_2nd_pass() failed. Stop.\n");
 			emergency_help_message();
 			ret = 1;
 			goto out;
 		} else if (ret > 0) {
 			// Need 2nd pass. Get the just written content.
-			msg_pdbg("GEC needs 2nd pass.\n");
+			msg_pdbg("CROS_EC needs 2nd pass.\n");
 			if (read_flash(flash, oldcontents, 0, size)) {
 				msg_cerr("Uh oh. Cannot get latest content.\n");
 				emergency_help_message();
@@ -2060,7 +2060,7 @@
 			// write 2nd pass
 			if (erase_and_write_flash(flash, oldcontents,
 			                          newcontents)) {
-				msg_cerr("Uh oh. GEC 2nd pass failed.\n");
+				msg_cerr("Uh oh. CROS_EC 2nd pass failed.\n");
 				emergency_help_message();
 				ret = 1;
 				goto out;
@@ -2068,8 +2068,8 @@
 			ret = 0;
 		}
 
-		if (gec_finish() < 0) {
-			msg_cerr("gec_finish() failed. Stop.\n");
+		if (cros_ec_finish() < 0) {
+			msg_cerr("cros_ec_finish() failed. Stop.\n");
 			emergency_help_message();
 			ret = 1;
 			goto out;