mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
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 <clamor95@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user