diff options
| author | Ovidiu Panait <ovidiu.panait.oss@gmail.com> | 2025-09-19 22:53:57 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-13 09:09:29 +0200 |
| commit | b10f6768d5ce85c75b298755ba74b470f33d9bd1 (patch) | |
| tree | 75632abb1fb717ef30809c5bdf883f2e21ca1ef9 | |
| parent | 60d042a787e069af82733ed211aceebcfb93a167 (diff) | |
staging: axis-fifo: remove unneeded irq field from struct axis_fifo
The irq number returned by platform_get_irq() is stored in struct axis_fifo
during probe but it is never used afterwards. Drop the redundant irq field
and use a local variable instead.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Link: https://lore.kernel.org/r/20250919195400.3180039-3-ovidiu.panait.oss@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/axis-fifo/axis-fifo.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c index d01f4809fc2b..62fca919a525 100644 --- a/drivers/staging/axis-fifo/axis-fifo.c +++ b/drivers/staging/axis-fifo/axis-fifo.c @@ -117,7 +117,6 @@ MODULE_PARM_DESC(write_timeout, "ms to wait before blocking write() timing out; struct axis_fifo { int id; - int irq; /* interrupt */ void __iomem *base_addr; /* kernel space memory */ unsigned int rx_fifo_depth; /* max words in the receive fifo */ @@ -581,6 +580,7 @@ static int axis_fifo_probe(struct platform_device *pdev) struct axis_fifo *fifo = NULL; char *device_name; int rc = 0; /* error return value */ + int irq; /* ---------------------------- * init wrapper device @@ -634,17 +634,16 @@ static int axis_fifo_probe(struct platform_device *pdev) */ /* get IRQ resource */ - rc = platform_get_irq(pdev, 0); - if (rc < 0) - return rc; + irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; /* request IRQ */ - fifo->irq = rc; - rc = devm_request_irq(fifo->dt_device, fifo->irq, &axis_fifo_irq, 0, + rc = devm_request_irq(fifo->dt_device, irq, &axis_fifo_irq, 0, DRIVER_NAME, fifo); if (rc) { dev_err(fifo->dt_device, "couldn't allocate interrupt %i\n", - fifo->irq); + irq); return rc; } |
