mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
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>
This commit is contained in:

committed by
Stefan Reinauer

parent
8e3a600123
commit
7038564346
@ -79,7 +79,7 @@ int probe_82802ab(struct flashchip *flash)
|
||||
size_t size = flash->total_size * 1024;
|
||||
// we need to mmap the write-protect space.
|
||||
bios = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
|
||||
flash->fd_mem, (off_t) (0 - 0x400000 - size));
|
||||
fd_mem, (off_t) (0 - 0x400000 - size));
|
||||
if (bios == MAP_FAILED) {
|
||||
// it's this part but we can't map it ...
|
||||
perror("Error MMAP memory using " MEM_DEV );
|
||||
|
Reference in New Issue
Block a user