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,13 +87,11 @@ static int console_out(int c)
|
||||||
|
|
||||||
#endif /* CONFIG_UART_CONSOLE_DEBUG_SERVER_HOOKS */
|
#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) {
|
||||||
if (pm_device_runtime_get(uart_console_dev) < 0) {
|
/* Enabling the UART instance has failed but this
|
||||||
/* Enabling the UART instance has failed but this
|
* function MUST return the byte output.
|
||||||
* function MUST return the byte output.
|
*/
|
||||||
*/
|
return c;
|
||||||
return c;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('\n' == c) {
|
if ('\n' == c) {
|
||||||
|
|
@ -101,10 +99,8 @@ static int console_out(int c)
|
||||||
}
|
}
|
||||||
uart_poll_out(uart_console_dev, c);
|
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 */
|
||||||
/* As errors cannot be returned, ignore the return value */
|
(void)pm_device_runtime_put(uart_console_dev);
|
||||||
(void)pm_device_runtime_put(uart_console_dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue