summaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-qcom-spmi-misc.c
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2022-12-28 14:30:58 +0100
committerChanwoo Choi <cw00.choi@samsung.com>2023-05-29 16:30:15 +0200
commitfe551bc9dcc6a557831dfe1544c1653ab24347a6 (patch)
treedbc254fbf408cdb69402500425565da03441270e /drivers/extcon/extcon-qcom-spmi-misc.c
parentdt-bindings: pm8941-misc: Fix usb_id and usb_vbus definitions (diff)
downloadlinux-fe551bc9dcc6a557831dfe1544c1653ab24347a6.tar.xz
linux-fe551bc9dcc6a557831dfe1544c1653ab24347a6.zip
extcon: qcom-spmi: Switch to platform_get_irq_byname_optional
Valid configurations for the extcon interrupt declarations are - usb_id - usb_vbus - (usb_id | usb_vbus) In the case of a standalone usb_id or usb_vbus failure to find one of the interrupts shouldn't generate a warning message. A warning is already in place if both IRQs are missing. Switch to using platform_get_irq_byname_optional() in order to facilitate this behaviour. Suggested-by: Marijn Suijten <marijn.suijten@somainline.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to '')
-rw-r--r--drivers/extcon/extcon-qcom-spmi-misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c
index eb02cb962b5e..f72e90ceca53 100644
--- a/drivers/extcon/extcon-qcom-spmi-misc.c
+++ b/drivers/extcon/extcon-qcom-spmi-misc.c
@@ -123,7 +123,7 @@ static int qcom_usb_extcon_probe(struct platform_device *pdev)
if (ret)
return ret;
- info->id_irq = platform_get_irq_byname(pdev, "usb_id");
+ info->id_irq = platform_get_irq_byname_optional(pdev, "usb_id");
if (info->id_irq > 0) {
ret = devm_request_threaded_irq(dev, info->id_irq, NULL,
qcom_usb_irq_handler,
@@ -136,7 +136,7 @@ static int qcom_usb_extcon_probe(struct platform_device *pdev)
}
}
- info->vbus_irq = platform_get_irq_byname(pdev, "usb_vbus");
+ info->vbus_irq = platform_get_irq_byname_optional(pdev, "usb_vbus");
if (info->vbus_irq > 0) {
ret = devm_request_threaded_irq(dev, info->vbus_irq, NULL,
qcom_usb_irq_handler,