diff options
author | Federico Vaga <federico.vaga@cern.ch> | 2019-08-22 15:21:32 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-08-29 22:12:19 +0200 |
commit | ba919403566dba52bf074851896ba0ca7f72c1e2 (patch) | |
tree | 0d12dd128f4381baed217ae97bcea0cd70c71e55 /drivers/i2c | |
parent | a6af48ec0712a0c98d8abe6b47c655b26026fceb (diff) | |
download | linux-ba919403566dba52bf074851896ba0ca7f72c1e2.tar.gz linux-ba919403566dba52bf074851896ba0ca7f72c1e2.tar.bz2 linux-ba919403566dba52bf074851896ba0ca7f72c1e2.zip |
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-ocores.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index 4117f1abc7c6..ca8b3ecfa93d 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b/drivers/i2c/busses/i2c-ocores.c @@ -703,8 +703,9 @@ static int ocores_i2c_probe(struct platform_device *pdev) } if (ocores_algorithm.master_xfer != ocores_xfer_polling) { - ret = devm_request_irq(&pdev->dev, irq, ocores_isr, 0, - pdev->name, i2c); + ret = devm_request_any_context_irq(&pdev->dev, irq, + ocores_isr, 0, + pdev->name, i2c); if (ret) { dev_err(&pdev->dev, "Cannot claim IRQ\n"); goto err_clk; |