* [PATCH v2 1/1] spi: ppc4xx: Avoid returning 0 when failed to parse and map IRQ
@ 2024-08-14 14:45 Andy Shevchenko
2024-08-15 13:32 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2024-08-14 14:45 UTC (permalink / raw)
To: Mark Brown, linux-spi, linux-kernel; +Cc: Andy Shevchenko
0 is incorrect error code when failed to parse and map IRQ.
Replace OF specific old API for IRQ retrieval with a generic
one to fix this issue.
Fixes: 0f245463b01e ("spi: ppc4xx: handle irq_of_parse_and_map() errors")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: returned correct error code
drivers/spi/spi-ppc4xx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c
index 01fdecbf132d..8f6309f32de0 100644
--- a/drivers/spi/spi-ppc4xx.c
+++ b/drivers/spi/spi-ppc4xx.c
@@ -27,7 +27,6 @@
#include <linux/wait.h>
#include <linux/platform_device.h>
#include <linux/of_address.h>
-#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
@@ -412,9 +411,10 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
}
/* Request IRQ */
- hw->irqnum = irq_of_parse_and_map(np, 0);
- if (hw->irqnum <= 0)
+ ret = platform_get_irq(op, 0);
+ if (ret < 0)
goto free_host;
+ hw->irqnum = ret;
ret = request_irq(hw->irqnum, spi_ppc4xx_int,
0, "spi_ppc4xx_of", (void *)hw);
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/1] spi: ppc4xx: Avoid returning 0 when failed to parse and map IRQ
2024-08-14 14:45 [PATCH v2 1/1] spi: ppc4xx: Avoid returning 0 when failed to parse and map IRQ Andy Shevchenko
@ 2024-08-15 13:32 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-08-15 13:32 UTC (permalink / raw)
To: linux-spi, linux-kernel, Andy Shevchenko
On Wed, 14 Aug 2024 17:45:12 +0300, Andy Shevchenko wrote:
> 0 is incorrect error code when failed to parse and map IRQ.
> Replace OF specific old API for IRQ retrieval with a generic
> one to fix this issue.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: ppc4xx: Avoid returning 0 when failed to parse and map IRQ
commit: 7781f1d120fec8624fc654eda900fc8748262082
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-15 13:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-14 14:45 [PATCH v2 1/1] spi: ppc4xx: Avoid returning 0 when failed to parse and map IRQ Andy Shevchenko
2024-08-15 13:32 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox