uart.c: make use of no_bus_mux flag
This patch makes use of no_bus_mux flag in mraa_board_t to skip unnessary mux checks. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
5e0c6d3807
commit
38aa9e8fe6
@@ -152,6 +152,7 @@ mraa_uart_init(int index)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!plat->no_bus_mux) {
|
||||||
int pos = plat->uart_dev[index].rx;
|
int pos = plat->uart_dev[index].rx;
|
||||||
if (pos >= 0) {
|
if (pos >= 0) {
|
||||||
if (plat->pins[pos].uart.mux_total > 0) {
|
if (plat->pins[pos].uart.mux_total > 0) {
|
||||||
@@ -171,6 +172,7 @@ mraa_uart_init(int index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mraa_uart_context dev = mraa_uart_init_raw((char*)plat->uart_dev[index].device_path);
|
mraa_uart_context dev = mraa_uart_init_raw((char*)plat->uart_dev[index].device_path);
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user