From 8bac458ae9037b7d7ff4e59933e5cc22c32713d9 Mon Sep 17 00:00:00 2001 From: Thomas Cort Date: Wed, 19 Jun 2013 07:00:44 -0400 Subject: [PATCH] padconf: remove duplicate code. The same code block was repeated twice (copy & paste error). Change-Id: I2035c9fff46b3f0a52084c2d6c871bbda6f8f07f --- lib/libpadconf/padconf.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/libpadconf/padconf.c b/lib/libpadconf/padconf.c index c1b4d80a7..e25de226a 100644 --- a/lib/libpadconf/padconf.c +++ b/lib/libpadconf/padconf.c @@ -42,22 +42,6 @@ padconf_init() log_trace(&log, "Called %d times\n", use_count); return OK; } - mr.mr_base = PADCONF_REGISTERS_BASE; - mr.mr_limit = PADCONF_REGISTERS_BASE + 0x1000; - - if (sys_privctl(SELF, SYS_PRIV_ADD_MEM, &mr) != 0) { - log_warn(&log, "Unable to request permission to map memory\n"); - return EPERM; - } - - base = - (uint32_t) vm_map_phys(SELF, (void *) PADCONF_REGISTERS_BASE, - 0x1000); - - if (base == (uint32_t) MAP_FAILED) { - log_warn(&log, "Unable to map GPIO memory\n"); - return EPERM; - } mr.mr_base = PADCONF_REGISTERS_BASE; mr.mr_limit = PADCONF_REGISTERS_BASE + 0x1000; -- 2.44.0