Skip to content

Commit b10f676

Browse files
ovpanaitgregkh
authored andcommitted
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>
1 parent 60d042a commit b10f676

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

drivers/staging/axis-fifo/axis-fifo.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ MODULE_PARM_DESC(write_timeout, "ms to wait before blocking write() timing out;
117117

118118
struct axis_fifo {
119119
int id;
120-
int irq; /* interrupt */
121120
void __iomem *base_addr; /* kernel space memory */
122121

123122
unsigned int rx_fifo_depth; /* max words in the receive fifo */
@@ -581,6 +580,7 @@ static int axis_fifo_probe(struct platform_device *pdev)
581580
struct axis_fifo *fifo = NULL;
582581
char *device_name;
583582
int rc = 0; /* error return value */
583+
int irq;
584584

585585
/* ----------------------------
586586
* init wrapper device
@@ -634,17 +634,16 @@ static int axis_fifo_probe(struct platform_device *pdev)
634634
*/
635635

636636
/* get IRQ resource */
637-
rc = platform_get_irq(pdev, 0);
638-
if (rc < 0)
639-
return rc;
637+
irq = platform_get_irq(pdev, 0);
638+
if (irq < 0)
639+
return irq;
640640

641641
/* request IRQ */
642-
fifo->irq = rc;
643-
rc = devm_request_irq(fifo->dt_device, fifo->irq, &axis_fifo_irq, 0,
642+
rc = devm_request_irq(fifo->dt_device, irq, &axis_fifo_irq, 0,
644643
DRIVER_NAME, fifo);
645644
if (rc) {
646645
dev_err(fifo->dt_device, "couldn't allocate interrupt %i\n",
647-
fifo->irq);
646+
irq);
648647
return rc;
649648
}
650649

0 commit comments

Comments
 (0)