Use helper functions chip_{read,write}[bwl] to access flash chips

The semantic patch I used in r418 to make the original conversion to
accessor functions was missing one isomorphism:
a[b] <=> *(a+b)

The semantic patcher Coccinelle was used to create this patch. Semantic
patch follows:
@@
typedef uint8_t;
expression a;
volatile uint8_t *b;
@@
- b[a]
+ *(b + a)
@@
expression a;
volatile uint8_t *b;
@@
- *(b) = (a);
+ chip_writeb(a, b);
@@
volatile uint8_t *b;
@@
- *(b)
+ chip_readb(b)
@@
type T;
T b;
@@
(
 chip_readb
|
 chip_writeb
)
 (...,
- (T)
- (b)
+ b
 )

Corresponding to flashrom svn r498.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
diff --git a/w39v080fa.c b/w39v080fa.c
index ba32add..7b827f8 100644
--- a/w39v080fa.c
+++ b/w39v080fa.c
@@ -180,8 +180,8 @@
 	printf("\n");
 
 	for (i = 0; i < total_size; i++) {
-		if (bios[i] != 0xff) {
-			fprintf(stderr, "Error: Flash chip erase failed at 0x%08x(0x%02x)\n", i, bios[i]);
+		if (chip_readb(bios + i) != 0xff) {
+			fprintf(stderr, "Error: Flash chip erase failed at 0x%08x(0x%02x)\n", i, chip_readb(bios + i));
 			return -1;
 		}
 	}