padconf: remove duplicate code.
The same code block was repeated twice (copy & paste error). Change-Id: I2035c9fff46b3f0a52084c2d6c871bbda6f8f07f
This commit is contained in:
parent
8e7c0604bd
commit
8bac458ae9
1 changed files with 0 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue