[PATCH] power:supply:88pm860x_battery:use platform_get_irq_optional()

From: Tang Bin
Date: Thu Apr 02 2020 - 07:11:14 EST


In order to simply code,because platform_get_irq() already has
dev_err() message.

Signed-off-by: Tang Bin <tangbin@xxxxxxxxxxxxxxxxxxxx>
---
drivers/power/supply/88pm860x_battery.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/power/supply/88pm860x_battery.c b/drivers/power/supply/88pm860x_battery.c
index 5ca047b3f..960d408d4 100644
--- a/drivers/power/supply/88pm860x_battery.c
+++ b/drivers/power/supply/88pm860x_battery.c
@@ -918,13 +918,13 @@ static int pm860x_battery_probe(struct platform_device *pdev)
if (!info)
return -ENOMEM;

- info->irq_cc = platform_get_irq(pdev, 0);
+ info->irq_cc = platform_get_irq_optional(pdev, 0);
if (info->irq_cc <= 0) {
dev_err(&pdev->dev, "No IRQ resource!\n");
return -EINVAL;
}

- info->irq_batt = platform_get_irq(pdev, 1);
+ info->irq_batt = platform_get_irq_optional(pdev, 1);
if (info->irq_batt <= 0) {
dev_err(&pdev->dev, "No IRQ resource!\n");
return -EINVAL;
--
2.20.1.windows.1