From: Thomas Cort Date: Wed, 19 Jun 2013 11:00:44 +0000 (-0400) Subject: padconf: remove duplicate code. X-Git-Tag: v3.3.0~910 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F659%2F2;p=minix.git padconf: remove duplicate code. The same code block was repeated twice (copy & paste error). Change-Id: I2035c9fff46b3f0a52084c2d6c871bbda6f8f07f --- 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;