[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200402111222.15204-1-tangbin@cmss.chinamobile.com>
Date: Thu, 2 Apr 2020 19:12:22 +0800
From: Tang Bin <tangbin@...s.chinamobile.com>
To: sre@...nel.org
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Tang Bin <tangbin@...s.chinamobile.com>
Subject: [PATCH] power:supply:88pm860x_battery:use platform_get_irq_optional()
In order to simply code,because platform_get_irq() already has
dev_err() message.
Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
---
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
Powered by blists - more mailing lists