spi: pxa2xx-pci: Move dma_burst_size assignment to ->setup()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 25 Feb 2022 17:23:44 +0000 (19:23 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 28 Feb 2022 12:10:21 +0000 (12:10 +0000)
Instead of using conditional, move dma_burst_size to the corresponding
->setup() function.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220225172350.69797-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx-pci.c

index 87629da3e544da52e925f339a1936a9a2f255a64..c2cbb002784ac8e70be47475eb29000e0f1803f3 100644 (file)
@@ -38,7 +38,7 @@ struct pxa_spi_info {
        void *tx_param;
        void *rx_param;
 
-       int dma_burst_size;
+       unsigned int dma_burst_size;
 
        int (*setup)(struct pci_dev *pdev, struct pxa_spi_info *c);
 };
@@ -111,6 +111,7 @@ static int lpss_spi_setup(struct pci_dev *dev, struct pxa_spi_info *c)
        }
 
        c->dma_filter = lpss_dma_filter;
+       c->dma_burst_size = 1;
        return 0;
 }
 
@@ -265,7 +266,7 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
        spi_pdata.tx_param = c->tx_param;
        spi_pdata.rx_param = c->rx_param;
        spi_pdata.enable_dma = c->rx_param && c->tx_param;
-       spi_pdata.dma_burst_size = c->dma_burst_size ? c->dma_burst_size : 1;
+       spi_pdata.dma_burst_size = c->dma_burst_size;
 
        ssp = &spi_pdata.ssp;
        ssp->dev = &dev->dev;