diff options
| author | Svyatoslav Ryhel <[email protected]> | 2026-02-07 20:26:21 +0200 |
|---|---|---|
| committer | Svyatoslav Ryhel <[email protected]> | 2026-03-22 14:58:58 +0200 |
| commit | b0c5baa89b1b671a099e44c8415e1842870493ec (patch) | |
| tree | 3efdfbe95564e44d0dda2741f9738bfda18a580f /drivers/input | |
| parent | 36b142e11f4d5245a19ff1a73c1eae2579b11703 (diff) | |
input: cpcap_pwrbutton: set default keycode fallback
Set a default fallback value if no keycode is defined
Signed-off-by: Svyatoslav Ryhel <[email protected]>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/cpcap_pwrbutton.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/input/cpcap_pwrbutton.c b/drivers/input/cpcap_pwrbutton.c index c8ad39d33ca..c52c0481f67 100644 --- a/drivers/input/cpcap_pwrbutton.c +++ b/drivers/input/cpcap_pwrbutton.c @@ -87,9 +87,7 @@ static int cpcap_pwrbutton_of_to_plat(struct udevice *dev) priv->bank = irq_desc / 16; priv->id = irq_desc % 16; - ret = dev_read_u32(dev, "linux,code", &priv->keycode); - if (ret) - return ret; + priv->keycode = dev_read_u32_default(dev, "linux,code", KEY_POWER); priv->old_state = false; priv->skip = false; |
