Skip to content

Commit a8d44c3

Browse files
bjarki-andreasenkartben
authored andcommitted
pm: policy: remove redundant ifdef exclusion of device_power_lock
Remove redundant ifdef exclusion of calls to pm_policy_device_power_lock_get() and pm_policy_device_power_lock_put(). Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
1 parent b642925 commit a8d44c3

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

drivers/i2c/i2c_mcux_flexcomm.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,7 @@ static int mcux_flexcomm_transfer(const struct device *dev,
157157

158158
k_sem_take(&data->lock, K_FOREVER);
159159

160-
#ifdef CONFIG_PM_POLICY_DEVICE_CONSTRAINTS
161160
pm_policy_device_power_lock_get(dev);
162-
#endif
163161

164162
/* Iterate over all the messages */
165163
for (int i = 0; i < num_msgs; i++) {
@@ -215,9 +213,7 @@ static int mcux_flexcomm_transfer(const struct device *dev,
215213
msgs++;
216214
}
217215

218-
#ifdef CONFIG_PM_POLICY_DEVICE_CONSTRAINTS
219216
pm_policy_device_power_lock_put(dev);
220-
#endif
221217

222218
k_sem_give(&data->lock);
223219

drivers/mipi_dbi/mipi_dbi_nxp_lcdic.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,7 @@ static int mipi_dbi_lcdic_write_display(const struct device *dev,
430430
goto release_sem;
431431
}
432432

433-
#ifdef CONFIG_PM_POLICY_DEVICE_CONSTRAINTS
434433
pm_policy_device_power_lock_get(dev);
435-
#endif
436434

437435
ret = mipi_dbi_lcdic_configure(dev, dbi_config);
438436
if (ret) {
@@ -527,9 +525,7 @@ static int mipi_dbi_lcdic_write_display(const struct device *dev,
527525
}
528526

529527
release_power_lock:
530-
#ifdef CONFIG_PM_POLICY_DEVICE_CONSTRAINTS
531528
pm_policy_device_power_lock_put(dev);
532-
#endif
533529

534530
release_sem:
535531
k_sem_give(&dev_data->lock);
@@ -554,9 +550,7 @@ static int mipi_dbi_lcdic_write_cmd(const struct device *dev,
554550
goto release_sem;
555551
}
556552

557-
#ifdef CONFIG_PM_POLICY_DEVICE_CONSTRAINTS
558553
pm_policy_device_power_lock_get(dev);
559-
#endif
560554

561555
ret = mipi_dbi_lcdic_configure(dev, dbi_config);
562556
if (ret) {
@@ -632,9 +626,7 @@ static int mipi_dbi_lcdic_write_cmd(const struct device *dev,
632626
}
633627

634628
release_power_lock:
635-
#ifdef CONFIG_PM_POLICY_DEVICE_CONSTRAINTS
636629
pm_policy_device_power_lock_put(dev);
637-
#endif
638630

639631
release_sem:
640632
k_sem_give(&dev_data->lock);
@@ -821,9 +813,7 @@ static void mipi_dbi_lcdic_isr(const struct device *dev)
821813
base->IMR |= LCDIC_ALL_INTERRUPTS;
822814
/* All data has been sent. */
823815
k_sem_give(&data->xfer_sem);
824-
#ifdef CONFIG_PM_POLICY_DEVICE_CONSTRAINTS
825816
pm_policy_device_power_lock_put(dev);
826-
#endif
827817
} else {
828818
/* Command done. Queue next command */
829819
data->cmd_bytes = MIN(data->xfer_bytes, LCDIC_MAX_XFER);

0 commit comments

Comments
 (0)