Message ID | 20200402111222.15204-1-tangbin@cmss.chinamobile.com |
---|---|
State | New |
Headers | show |
Series | power:supply:88pm860x_battery:use platform_get_irq_optional() | expand |
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;
In order to simply code,because platform_get_irq() already has dev_err() message. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> --- drivers/power/supply/88pm860x_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)