File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -557,16 +557,24 @@ static int exit_dpd(const struct device *const dev)
557557/* Everything necessary to acquire owning access to the device. */
558558static void acquire_device (const struct device * dev )
559559{
560+ const struct spi_nor_config * cfg = dev -> config ;
561+
560562 if (IS_ENABLED (CONFIG_MULTITHREADING )) {
561563 struct spi_nor_data * const driver_data = dev -> data ;
562564
563565 k_sem_take (& driver_data -> sem , K_FOREVER );
564566 }
567+
568+ (void )pm_device_runtime_get (cfg -> spi .bus );
565569}
566570
567571/* Everything necessary to release access to the device. */
568572static void release_device (const struct device * dev )
569573{
574+ const struct spi_nor_config * cfg = dev -> config ;
575+
576+ (void )pm_device_runtime_put (cfg -> spi .bus );
577+
570578 if (IS_ENABLED (CONFIG_MULTITHREADING )) {
571579 struct spi_nor_data * const driver_data = dev -> data ;
572580
You can’t perform that action at this time.
0 commit comments