Skip to content

Commit 5879806

Browse files
kkasperczyk-nopull[bot]
authored andcommitted
[nrfconnect] Use device instead of device label for QSPI (#23171)
Moves from the obsolete device label to using the device directly.
1 parent da97c85 commit 5879806

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platform/nrfconnect/OTAImageProcessorImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ void FlashHandler::DoAction(Action aAction)
213213
{
214214
#if CONFIG_PM_DEVICE && CONFIG_NORDIC_QSPI_NOR && !CONFIG_SOC_NRF52840 // nRF52 is optimized per default
215215
// utilize the QSPI driver sleep power mode
216-
const auto * qspi_dev = device_get_binding(DT_LABEL(DT_INST(0, nordic_qspi_nor)));
217-
if (qspi_dev)
216+
const auto * qspi_dev = DEVICE_DT_GET(DT_INST(0, nordic_qspi_nor));
217+
if (device_is_ready(qspi_dev))
218218
{
219219
const auto requestedAction = Action::WAKE_UP == aAction ? PM_DEVICE_ACTION_RESUME : PM_DEVICE_ACTION_SUSPEND;
220220
(void) pm_device_action_run(qspi_dev, requestedAction); // not much can be done in case of a failure

0 commit comments

Comments
 (0)