diff options
| author | Svyatoslav Ryhel <[email protected]> | 2026-02-07 20:43:11 +0200 |
|---|---|---|
| committer | Svyatoslav Ryhel <[email protected]> | 2026-03-22 14:58:58 +0200 |
| commit | b14a6635d864d47a88ba8f22c927abc5cc1ab8ea (patch) | |
| tree | acb865409e04f9c7923be9d2548d66b48c0f010a /drivers | |
| parent | b0c5baa89b1b671a099e44c8415e1842870493ec (diff) | |
input: cpcap_pwrbutton: simplify parent verification
Check for 'cpcap' within the compatible string, as various CPCAP
compositions always include this component.
Signed-off-by: Svyatoslav Ryhel <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/input/cpcap_pwrbutton.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/cpcap_pwrbutton.c b/drivers/input/cpcap_pwrbutton.c index c52c0481f67..ef6311bbfc5 100644 --- a/drivers/input/cpcap_pwrbutton.c +++ b/drivers/input/cpcap_pwrbutton.c @@ -76,7 +76,7 @@ static int cpcap_pwrbutton_of_to_plat(struct udevice *dev) /* Check interrupt parent, driver supports only CPCAP as parent */ irq_parent = ofnode_parse_phandle(dev_ofnode(dev), "interrupt-parent", 0); - if (!ofnode_device_is_compatible(irq_parent, "motorola,cpcap")) + if (!strstr(ofnode_get_name(irq_parent), "cpcap")) return -EINVAL; ret = dev_read_u32(dev, "interrupts", &irq_desc); |
