Trivial (cosmetic) cleanup

* Only open /dev/mem once and do it early.
* Drop extern for function prototypes.
* Minimize ts5300 impact in probe_flash()

This cleanup will making ICH7 SPI support quite some easier.

Corresponding to flashrom svn r100 and coreboot v2 svn r2585.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
diff --git a/sst49lfxxxc.c b/sst49lfxxxc.c
index 4486186..522cb9b 100644
--- a/sst49lfxxxc.c
+++ b/sst49lfxxxc.c
@@ -151,7 +151,7 @@
 		return 0;
 
 	bios = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
-		    flash->fd_mem, (off_t) (0xFFFFFFFF - 0x400000 - size + 1));
+		    fd_mem, (off_t) (0xFFFFFFFF - 0x400000 - size + 1));
 	if (bios == MAP_FAILED) {
 		// it's this part but we can't map it ...
 		perror("Error MMAP /dev/mem");