Skip to content

Commit 07258bd

Browse files
committed
drivers: console: uart: s/device_is_ready/device_get
Use device_get(). Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
1 parent 5d0cdb2 commit 07258bd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/console/uart_console.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,11 @@ static void uart_console_hook_install(void)
605605
*/
606606
static int uart_console_init(void)
607607
{
608-
if (!device_is_ready(uart_console_dev)) {
609-
return -ENODEV;
608+
int ret;
609+
610+
ret = device_get(uart_console_dev);
611+
if (ret < 0) {
612+
return ret;
610613
}
611614

612615
uart_console_hook_install();

0 commit comments

Comments
 (0)