drivers: uart_nrfx_uarte: Use predefined data pointer where applicable
After recent changes in the driver, the predefined `data` pointer in `uarte_nrfx_pm_control()` would not be used in CONFIG_UART_ASYNC_API configuration. Fix this by replacing `get_dev_data()` calls with predefined data pointer where applicable. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
742ee977ca
commit
a2e619ec8b
1 changed files with 3 additions and 3 deletions
|
@ -1845,10 +1845,10 @@ static int uarte_nrfx_pm_control(const struct device *dev,
|
||||||
nrf_uarte_enable(uarte);
|
nrf_uarte_enable(uarte);
|
||||||
|
|
||||||
#ifdef CONFIG_UART_ASYNC_API
|
#ifdef CONFIG_UART_ASYNC_API
|
||||||
if (hw_rx_counting_enabled(get_dev_data(dev))) {
|
if (hw_rx_counting_enabled(data)) {
|
||||||
nrfx_timer_enable(&get_dev_config(dev)->timer);
|
nrfx_timer_enable(&get_dev_config(dev)->timer);
|
||||||
}
|
}
|
||||||
if (get_dev_data(dev)->async) {
|
if (data->async) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1870,7 +1870,7 @@ static int uarte_nrfx_pm_control(const struct device *dev,
|
||||||
* only sent after each RX if async UART API is used.
|
* only sent after each RX if async UART API is used.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_UART_ASYNC_API
|
#ifdef CONFIG_UART_ASYNC_API
|
||||||
if (get_dev_data(dev)->async) {
|
if (data->async) {
|
||||||
/* Entering inactive state requires device to be no
|
/* Entering inactive state requires device to be no
|
||||||
* active asynchronous calls.
|
* active asynchronous calls.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue