diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2009-04-15 10:52:49 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2009-04-15 10:52:49 +0000 |
commit | 52104942f99808523e83bbd2158389c691628965 (patch) | |
tree | a7a0f9007136af9d3288b4e3509fe6fa4b4734d7 /physmap.c | |
parent | 4a8476102a8c009d8ecfa1bff9447b905390a15b (diff) | |
download | flashrom-52104942f99808523e83bbd2158389c691628965.zip flashrom-52104942f99808523e83bbd2158389c691628965.tar.gz |
Some coding style and consistency fixes
Corresponding to flashrom svn r429 and coreboot v2 svn r4117.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'physmap.c')
-rw-r--r-- | physmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -16,6 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -55,13 +56,14 @@ void *sys_physmap(unsigned long phys_addr, size_t len) if (-1 == fd_mem) { /* Open the memory device UNCACHED. Important for MMIO. */ - if (-1 == (fd_mem = open(MEM_DEV, O_RDWR|O_SYNC))) { + if (-1 == (fd_mem = open(MEM_DEV, O_RDWR | O_SYNC))) { perror("Critical error: open(" MEM_DEV ")"); exit(2); } } - virt_addr = mmap(0, len, PROT_WRITE|PROT_READ, MAP_SHARED, fd_mem, (off_t)phys_addr); + virt_addr = mmap(0, len, PROT_WRITE | PROT_READ, MAP_SHARED, + fd_mem, (off_t)phys_addr); return MAP_FAILED == virt_addr ? NULL : virt_addr; } |