summaryrefslogtreecommitdiff
path: root/physmap.c
diff options
context:
space:
mode:
authoruwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-04-15 10:52:49 +0000
committeruwe <uwe@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-04-15 10:52:49 +0000
commitdb3dd80ee2b332806fbd0eb07e44e49d9c5548fa (patch)
treea7a0f9007136af9d3288b4e3509fe6fa4b4734d7 /physmap.c
parenta4fe8099bfc9b2b5d74a51a435d93d0b1699be4c (diff)
downloadflashrom-db3dd80ee2b332806fbd0eb07e44e49d9c5548fa.tar.gz
Original v2 revision: 4117
Some coding style and consistency fixes (trivial). Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@429 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'physmap.c')
-rw-r--r--physmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/physmap.c b/physmap.c
index 0fb6c5c..49e1bfc 100644
--- a/physmap.c
+++ b/physmap.c
@@ -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;
}