Skip to content

Commit

Permalink
chore(kscan): fix unused variable warning in kssb
Browse files Browse the repository at this point in the history
If using sideband kscan for tasks other than soft off (i.e. with CONFIG_PM_DEVICE disabled) the compiler throws an unused variable warning. Moving inside the #if IS_ENABLED(CONFIG_PM_DEVICE) fixes this warning
  • Loading branch information
ReFil committed May 31, 2024
1 parent 2d96f46 commit 4df4893
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/kscan_sideband_behaviors.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ void ksbb_inner_kscan_callback(const struct device *dev, uint32_t row, uint32_t
}

static int ksbb_configure(const struct device *dev, kscan_callback_t callback) {
const struct ksbb_config *cfg = dev->config;
struct ksbb_data *data = dev->data;

data->callback = callback;

#if IS_ENABLED(CONFIG_PM_DEVICE)
const struct ksbb_config *cfg = dev->config;
if (pm_device_wakeup_is_enabled(dev) && pm_device_wakeup_is_capable(cfg->kscan)) {
pm_device_wakeup_enable(cfg->kscan, true);
}
Expand Down

0 comments on commit 4df4893

Please sign in to comment.