char: xillybus: Simplify 'xillybus_init_endpoint()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 27 Aug 2021 17:17:53 +0000 (19:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Sep 2021 09:12:56 +0000 (11:12 +0200)
Ths first argument of 'xillybus_init_endpoint()' is now useless.
Remove it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/ba687c1eff5dc8f21422323f57164d06f25d4169.1630083668.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/xillybus/xillybus.h
drivers/char/xillybus/xillybus_core.c
drivers/char/xillybus/xillybus_of.c
drivers/char/xillybus/xillybus_pcie.c

index 55d47cb..afce5bb 100644 (file)
@@ -134,8 +134,7 @@ struct xilly_mapping {
 
 irqreturn_t xillybus_isr(int irq, void *data);
 
-struct xilly_endpoint *xillybus_init_endpoint(struct pci_dev *pdev,
-                                             struct device *dev,
+struct xilly_endpoint *xillybus_init_endpoint(struct device *dev,
                                              struct xilly_endpoint_hardware
                                              *ephw);
 
index 0ced9ec..02f3014 100644 (file)
@@ -1772,8 +1772,7 @@ static const struct file_operations xillybus_fops = {
        .poll       = xillybus_poll,
 };
 
-struct xilly_endpoint *xillybus_init_endpoint(struct pci_dev *pdev,
-                                             struct device *dev,
+struct xilly_endpoint *xillybus_init_endpoint(struct device *dev,
                                              struct xilly_endpoint_hardware
                                              *ephw)
 {
@@ -1783,7 +1782,6 @@ struct xilly_endpoint *xillybus_init_endpoint(struct pci_dev *pdev,
        if (!endpoint)
                return NULL;
 
-       (void)pdev;     // silence a compiler warning, will be removed
        endpoint->dev = dev;
        endpoint->ephw = ephw;
        endpoint->msg_counter = 0x0b;
index 1a20b28..4e6e0c1 100644 (file)
@@ -120,7 +120,7 @@ static int xilly_drv_probe(struct platform_device *op)
        if (of_property_read_bool(dev->of_node, "dma-coherent"))
                ephw = &of_hw_coherent;
 
-       endpoint = xillybus_init_endpoint(NULL, dev, ephw);
+       endpoint = xillybus_init_endpoint(dev, ephw);
 
        if (!endpoint)
                return -ENOMEM;
index f4be613..a6ef4ce 100644 (file)
@@ -124,7 +124,7 @@ static int xilly_probe(struct pci_dev *pdev,
        struct xilly_endpoint *endpoint;
        int rc;
 
-       endpoint = xillybus_init_endpoint(pdev, &pdev->dev, &pci_hw);
+       endpoint = xillybus_init_endpoint(&pdev->dev, &pci_hw);
 
        if (!endpoint)
                return -ENOMEM;