]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
input: cpcap_pwrbutton: simplify parent verification
authorSvyatoslav Ryhel <clamor95@gmail.com>
Sat, 7 Feb 2026 18:43:11 +0000 (20:43 +0200)
committerSvyatoslav Ryhel <clamor95@gmail.com>
Sun, 22 Mar 2026 12:58:58 +0000 (14:58 +0200)
Check for 'cpcap' within the compatible string, as various CPCAP
compositions always include this component.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
drivers/input/cpcap_pwrbutton.c

index c52c0481f6732cdc965f9f02bc372594f990e406..ef6311bbfc524cc4cec871fd636dfecdc68aa2a1 100644 (file)
@@ -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);