mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
chore: Various soft-off review fixes
* Code style to avoid goto. * Enable pm.c compilation via dedicated Kconfig flag. * Comment wakeup trigger PM behavior.
This commit is contained in:
@@ -324,11 +324,9 @@ static int kscan_direct_init(const struct device *dev) {
|
||||
static int kscan_direct_pm_action(const struct device *dev, enum pm_device_action action) {
|
||||
switch (action) {
|
||||
case PM_DEVICE_ACTION_SUSPEND:
|
||||
kscan_direct_disable(dev);
|
||||
break;
|
||||
return kscan_direct_disable(dev);
|
||||
case PM_DEVICE_ACTION_RESUME:
|
||||
kscan_direct_enable(dev);
|
||||
break;
|
||||
return kscan_direct_enable(dev);
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
@@ -427,11 +427,9 @@ static int kscan_matrix_init(const struct device *dev) {
|
||||
static int kscan_matrix_pm_action(const struct device *dev, enum pm_device_action action) {
|
||||
switch (action) {
|
||||
case PM_DEVICE_ACTION_SUSPEND:
|
||||
kscan_matrix_disable(dev);
|
||||
break;
|
||||
return kscan_matrix_disable(dev);
|
||||
case PM_DEVICE_ACTION_RESUME:
|
||||
kscan_matrix_enable(dev);
|
||||
break;
|
||||
return kscan_matrix_enable(dev);
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user