arch: Convert returning codes to errno.h
This patch replaces all occurrences of DEV_* codes by errno.h codes at the arch layer. Change-Id: I1a1ab6d0481f3660ad032e2690d2577245fe1f34 Signed-off-by: Andre Guedes <andre.guedes@intel.com>
This commit is contained in:
parent
0cf74d1755
commit
db2e46319f
|
@ -27,7 +27,7 @@ static int arc_quark_se_ipm_init(void)
|
|||
IRQ_CONNECT(QUARK_SE_IPM_INTERRUPT, QUARK_SE_IPM_INTERRUPT_PRI,
|
||||
quark_se_ipm_isr, NULL, 0);
|
||||
irq_enable(QUARK_SE_IPM_INTERRUPT);
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct quark_se_ipm_controller_config_info ipm_controller_config = {
|
||||
|
@ -68,7 +68,7 @@ static int uart_ns16550_init(struct device *dev)
|
|||
INT_ENABLE_ARC_BIT_POS);
|
||||
#endif /* CONFIG_UART_NS16550_PORT_1 */
|
||||
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(uart_ns16550_init, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
|
|
|
@ -48,7 +48,7 @@ static int uart_stellaris_init(struct device *dev)
|
|||
RCGC1 |= RCGC1_UART2_EN;
|
||||
#endif
|
||||
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(uart_stellaris_init, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* hardware for the Quark SE BSP.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <nanokernel.h>
|
||||
#include <misc/printk.h>
|
||||
#include <misc/__assert.h>
|
||||
|
@ -57,7 +59,7 @@ static int arc_init(struct device *arg)
|
|||
if (!SCSS_REG_VAL(SCSS_SS_STS)) {
|
||||
/* ARC shouldn't already be running! */
|
||||
printk("ARC core already running!");
|
||||
return DEV_FAIL;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
/* Address of ARC side __reset stored in the first 4 bytes of arc.bin,
|
||||
|
@ -91,7 +93,7 @@ static int arc_init(struct device *arg)
|
|||
skip_arc_init:
|
||||
#endif
|
||||
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(arc_init, SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
|
@ -113,7 +115,7 @@ static int platform_uart_init(struct device *arg)
|
|||
SCSS_INTERRUPT->int_uart_mask[1] &= INT_UNMASK_IA;
|
||||
#endif
|
||||
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(platform_uart_init, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
|
|
|
@ -32,7 +32,7 @@ static int x86_quark_se_ipm_init(void)
|
|||
IRQ_CONNECT(QUARK_SE_IPM_INTERRUPT, QUARK_SE_IPM_INTERRUPT_PRI,
|
||||
quark_se_ipm_isr, NULL, 0);
|
||||
irq_enable(QUARK_SE_IPM_INTERRUPT);
|
||||
return DEV_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct quark_se_ipm_controller_config_info ipm_controller_config = {
|
||||
|
|
Loading…
Reference in a new issue