console: uart: remove pm_device_runtime_is_enabled check
`pm_device_runtime_get` and `pm_device_runtime_put` have returned `0` when device runtime PM is not enabled since #56222. Manually checking the state is no longer required. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
eb2e5de01c
commit
d131981257
1 changed files with 7 additions and 11 deletions
|
|
@ -87,24 +87,20 @@ static int console_out(int c)
|
|||
|
||||
#endif /* CONFIG_UART_CONSOLE_DEBUG_SERVER_HOOKS */
|
||||
|
||||
if (pm_device_runtime_is_enabled(uart_console_dev)) {
|
||||
if (pm_device_runtime_get(uart_console_dev) < 0) {
|
||||
/* Enabling the UART instance has failed but this
|
||||
* function MUST return the byte output.
|
||||
*/
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
if ('\n' == c) {
|
||||
uart_poll_out(uart_console_dev, '\r');
|
||||
}
|
||||
uart_poll_out(uart_console_dev, c);
|
||||
|
||||
if (pm_device_runtime_is_enabled(uart_console_dev)) {
|
||||
/* As errors cannot be returned, ignore the return value */
|
||||
(void)pm_device_runtime_put(uart_console_dev);
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue