lkml.org 
[lkml]   [2020]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ipmi:bt-bcm:use platform_get_irq_optional() to simplify code
Date
In this function's reference function 'bt_bmc_probe()',there are
judgments of print message about 'bt_bmc->irq',so use
platform_get_irq_optional() instead of platform_get_irq() to avoid
redundant dev_err() message.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
drivers/char/ipmi/bt-bmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index 890ad55aa..766e0e5bf 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -399,7 +399,7 @@ static int bt_bmc_config_irq(struct bt_bmc *bt_bmc,
struct device *dev = &pdev->dev;
int rc;

- bt_bmc->irq = platform_get_irq(pdev, 0);
+ bt_bmc->irq = platform_get_irq_optional(pdev, 0);
if (!bt_bmc->irq)
return -ENODEV;

--
2.20.1.windows.1


\
 
 \ /
  Last update: 2020-04-01 04:09    [W:0.029 / U:6.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site