mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
ipmi: si: Use platform_get_irq_optional() to retrieve interrupt
Use platform_get_irq_optional() to retrieve the interrupt resource instead of directly parsing and mapping the OF node via irq_of_parse_and_map(). This is the standard pattern for platform devices. irq_of_parse_and_map() requires ire_dispose_mapping(), which is missing. Assisted-by: Antigravity:Gemini-3.5-Flash Signed-off-by: Rosen Penev <rosenp@gmail.com> Message-ID: <20260603192511.6869-1-rosenp@gmail.com> [Handle a negative return from platform_get_irq_optional() to mean no interrupt is assigned.] Signed-off-by: Corey Minyard <corey@minyard.net>
This commit is contained in:
parent
a3f3859cec
commit
39851b7e58
|
|
@ -276,7 +276,10 @@ static int of_ipmi_probe(struct platform_device *pdev)
|
|||
io.regspacing = regspacing ? be32_to_cpup(regspacing) : DEFAULT_REGSPACING;
|
||||
io.regshift = regshift ? be32_to_cpup(regshift) : 0;
|
||||
|
||||
io.irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
|
||||
io.irq = platform_get_irq_optional(pdev, 0);
|
||||
if (io.irq < 0)
|
||||
io.irq = 0;
|
||||
|
||||
io.dev = &pdev->dev;
|
||||
|
||||
dev_dbg(&pdev->dev, "addr 0x%lx regsize %d spacing %d irq %d\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user