summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Deslandes <quentin.deslandes@itdev.co.uk>2019-11-01 21:42:59 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-03 13:09:01 +0100
commit354e27a86b4c6479cbc51a8e9e347665a73e8d12 (patch)
tree4e7e1a1021c0cab55814d1805d5768a23ae938ae
parent6a20d283ed68670e9301c4a951ea84fefbb2df53 (diff)
staging: axis-fifo: remove unused pointer to memory resource
Remove unused resource pointer from the device's internal structure. Signed-off-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Link: https://lore.kernel.org/r/20191101214232.16960-4-quentin.deslandes@itdev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/axis-fifo/axis-fifo.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 2e6e2f149a26..39e6c59df1e9 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -125,7 +125,6 @@ MODULE_PARM_DESC(write_timeout, "ms to wait before blocking write() timing out;
struct axis_fifo {
int irq; /* interrupt */
- struct resource *mem; /* physical memory */
void __iomem *base_addr; /* kernel space memory */
unsigned int rx_fifo_depth; /* max words in the receive fifo */
@@ -806,10 +805,8 @@ static int axis_fifo_probe(struct platform_device *pdev)
goto err_initial;
}
- fifo->mem = r_mem;
-
/* request physical memory */
- fifo->base_addr = devm_ioremap_resource(fifo->dt_device, fifo->mem);
+ fifo->base_addr = devm_ioremap_resource(fifo->dt_device, r_mem);
if (IS_ERR(fifo->base_addr)) {
rc = PTR_ERR(fifo->base_addr);
dev_err(fifo->dt_device, "can't remap IO resource (%d)\n", rc);
@@ -820,7 +817,7 @@ static int axis_fifo_probe(struct platform_device *pdev)
/* create unique device name */
snprintf(device_name, sizeof(device_name), "%s_%pa",
- DRIVER_NAME, &fifo->mem->start);
+ DRIVER_NAME, &r_mem->start);
dev_dbg(fifo->dt_device, "device name [%s]\n", device_name);
@@ -844,7 +841,7 @@ static int axis_fifo_probe(struct platform_device *pdev)
r_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!r_irq) {
dev_err(fifo->dt_device, "no IRQ found for 0x%pa\n",
- &fifo->mem->start);
+ &r_mem->start);
rc = -EIO;
goto err_initial;
}
@@ -898,7 +895,7 @@ static int axis_fifo_probe(struct platform_device *pdev)
}
dev_info(fifo->dt_device, "axis-fifo created at %pa mapped to 0x%pa, irq=%i, major=%i, minor=%i\n",
- &fifo->mem->start, &fifo->base_addr, fifo->irq,
+ &r_mem->start, &fifo->base_addr, fifo->irq,
MAJOR(fifo->devt), MINOR(fifo->devt));
return 0;