From: Svyatoslav Ryhel Date: Sat, 7 Feb 2026 18:43:11 +0000 (+0200) Subject: input: cpcap_pwrbutton: simplify parent verification X-Git-Tag: v2026.07-rc1~63^2~17^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b14a6635d864d47a88ba8f22c927abc5cc1ab8ea;p=thirdparty%2Fu-boot.git 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 --- 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);