Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: ocores: use request_any_context_irq() to register IRQ handler

The i2c-ocores device is an HDL component that get instantiated in FPGA.
The software stack used to drive an FPGA can be very different, and the
i2c-ocore ip-core must work in different context. With respect to this
patch the IRQ controller behind this device, and its driver, can have
different implementations (nested threads). For this reason, it is safer
to use `request_any_context_irq()` to avoid errors at probe time.

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

authored by

Federico Vaga and committed by
Wolfram Sang
ba919403 a6af48ec

+3 -2
+3 -2
drivers/i2c/busses/i2c-ocores.c
··· 703 703 } 704 704 705 705 if (ocores_algorithm.master_xfer != ocores_xfer_polling) { 706 - ret = devm_request_irq(&pdev->dev, irq, ocores_isr, 0, 707 - pdev->name, i2c); 706 + ret = devm_request_any_context_irq(&pdev->dev, irq, 707 + ocores_isr, 0, 708 + pdev->name, i2c); 708 709 if (ret) { 709 710 dev_err(&pdev->dev, "Cannot claim IRQ\n"); 710 711 goto err_clk;