]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fuzz cleanup for 5.5 and 5.4 spi patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Mar 2020 10:50:15 +0000 (11:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Mar 2020 10:50:15 +0000 (11:50 +0100)
queue-5.4/spi-spi-omap2-mcspi-support-probe-deferral-for-dma-c.patch
queue-5.5/spi-spi-omap2-mcspi-support-probe-deferral-for-dma-c.patch

index 85241ddf4854b9597c6d39c8d7ba51c9d74b79b1..6693c91d3f7237dd56abf524b64a6ae3cc34d263 100644 (file)
@@ -17,14 +17,12 @@ Link: https://lore.kernel.org/r/20200204124816.16735-3-vigneshr@ti.com
 Signed-off-by: Mark Brown <broonie@kernel.org>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/spi/spi-omap2-mcspi.c | 77 +++++++++++++++++------------------
+ drivers/spi/spi-omap2-mcspi.c |   77 ++++++++++++++++++++----------------------
  1 file changed, 38 insertions(+), 39 deletions(-)
 
-diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
-index 8e435da730996..cfb64e5a7d45d 100644
 --- a/drivers/spi/spi-omap2-mcspi.c
 +++ b/drivers/spi/spi-omap2-mcspi.c
-@@ -986,20 +986,12 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi,
+@@ -985,20 +985,12 @@ static int omap2_mcspi_setup_transfer(st
   * Note that we currently allow DMA only if we get a channel
   * for both rx and tx. Otherwise we'll do PIO for both rx and tx.
   */
@@ -48,7 +46,7 @@ index 8e435da730996..cfb64e5a7d45d 100644
                                             mcspi_dma->dma_rx_ch_name);
        if (IS_ERR(mcspi_dma->dma_rx)) {
                ret = PTR_ERR(mcspi_dma->dma_rx);
-@@ -1007,7 +999,7 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
+@@ -1006,7 +998,7 @@ static int omap2_mcspi_request_dma(struc
                goto no_dma;
        }
  
@@ -57,7 +55,7 @@ index 8e435da730996..cfb64e5a7d45d 100644
                                             mcspi_dma->dma_tx_ch_name);
        if (IS_ERR(mcspi_dma->dma_tx)) {
                ret = PTR_ERR(mcspi_dma->dma_tx);
-@@ -1016,20 +1008,40 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
+@@ -1015,20 +1007,40 @@ static int omap2_mcspi_request_dma(struc
                mcspi_dma->dma_rx = NULL;
        }
  
@@ -101,7 +99,7 @@ index 8e435da730996..cfb64e5a7d45d 100644
        if (!cs) {
                cs = kzalloc(sizeof *cs, GFP_KERNEL);
                if (!cs)
-@@ -1054,13 +1066,6 @@ static int omap2_mcspi_setup(struct spi_device *spi)
+@@ -1053,13 +1065,6 @@ static int omap2_mcspi_setup(struct spi_
                }
        }
  
@@ -115,7 +113,7 @@ index 8e435da730996..cfb64e5a7d45d 100644
        ret = pm_runtime_get_sync(mcspi->dev);
        if (ret < 0) {
                pm_runtime_put_noidle(mcspi->dev);
-@@ -1077,12 +1082,8 @@ static int omap2_mcspi_setup(struct spi_device *spi)
+@@ -1076,12 +1081,8 @@ static int omap2_mcspi_setup(struct spi_
  
  static void omap2_mcspi_cleanup(struct spi_device *spi)
  {
@@ -128,7 +126,7 @@ index 8e435da730996..cfb64e5a7d45d 100644
        if (spi->controller_state) {
                /* Unlink controller state from context save list */
                cs = spi->controller_state;
-@@ -1091,19 +1092,6 @@ static void omap2_mcspi_cleanup(struct spi_device *spi)
+@@ -1090,19 +1091,6 @@ static void omap2_mcspi_cleanup(struct s
                kfree(cs);
        }
  
@@ -148,7 +146,7 @@ index 8e435da730996..cfb64e5a7d45d 100644
        if (gpio_is_valid(spi->cs_gpio))
                gpio_free(spi->cs_gpio);
  }
-@@ -1314,6 +1302,9 @@ static bool omap2_mcspi_can_dma(struct spi_master *master,
+@@ -1313,6 +1301,9 @@ static bool omap2_mcspi_can_dma(struct s
        if (spi_controller_is_slave(master))
                return true;
  
@@ -158,7 +156,7 @@ index 8e435da730996..cfb64e5a7d45d 100644
        return (xfer->len >= DMA_MIN_BYTES);
  }
  
-@@ -1501,6 +1492,11 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
+@@ -1475,6 +1466,11 @@ static int omap2_mcspi_probe(struct plat
        for (i = 0; i < master->num_chipselect; i++) {
                sprintf(mcspi->dma_channels[i].dma_rx_ch_name, "rx%d", i);
                sprintf(mcspi->dma_channels[i].dma_tx_ch_name, "tx%d", i);
@@ -170,7 +168,7 @@ index 8e435da730996..cfb64e5a7d45d 100644
        }
  
        status = platform_get_irq(pdev, 0);
-@@ -1538,6 +1534,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
+@@ -1512,6 +1508,7 @@ disable_pm:
        pm_runtime_put_sync(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
  free_master:
@@ -178,7 +176,7 @@ index 8e435da730996..cfb64e5a7d45d 100644
        spi_master_put(master);
        return status;
  }
-@@ -1547,6 +1544,8 @@ static int omap2_mcspi_remove(struct platform_device *pdev)
+@@ -1521,6 +1518,8 @@ static int omap2_mcspi_remove(struct pla
        struct spi_master *master = platform_get_drvdata(pdev);
        struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
  
@@ -187,6 +185,3 @@ index 8e435da730996..cfb64e5a7d45d 100644
        pm_runtime_dont_use_autosuspend(mcspi->dev);
        pm_runtime_put_sync(mcspi->dev);
        pm_runtime_disable(&pdev->dev);
--- 
-2.20.1
-
index 8e4eee317b4a2c9f345473bdd4be21d5f16bb442..e68b097b5d7a16ec7f91d17892608c6addc24517 100644 (file)
@@ -17,14 +17,12 @@ Link: https://lore.kernel.org/r/20200204124816.16735-3-vigneshr@ti.com
 Signed-off-by: Mark Brown <broonie@kernel.org>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/spi/spi-omap2-mcspi.c | 77 +++++++++++++++++------------------
+ drivers/spi/spi-omap2-mcspi.c |   77 ++++++++++++++++++++----------------------
  1 file changed, 38 insertions(+), 39 deletions(-)
 
-diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
-index e9bc9cf984d60..e9e256718ef4a 100644
 --- a/drivers/spi/spi-omap2-mcspi.c
 +++ b/drivers/spi/spi-omap2-mcspi.c
-@@ -975,20 +975,12 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi,
+@@ -974,20 +974,12 @@ static int omap2_mcspi_setup_transfer(st
   * Note that we currently allow DMA only if we get a channel
   * for both rx and tx. Otherwise we'll do PIO for both rx and tx.
   */
@@ -48,7 +46,7 @@ index e9bc9cf984d60..e9e256718ef4a 100644
                                             mcspi_dma->dma_rx_ch_name);
        if (IS_ERR(mcspi_dma->dma_rx)) {
                ret = PTR_ERR(mcspi_dma->dma_rx);
-@@ -996,7 +988,7 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
+@@ -995,7 +987,7 @@ static int omap2_mcspi_request_dma(struc
                goto no_dma;
        }
  
@@ -57,7 +55,7 @@ index e9bc9cf984d60..e9e256718ef4a 100644
                                             mcspi_dma->dma_tx_ch_name);
        if (IS_ERR(mcspi_dma->dma_tx)) {
                ret = PTR_ERR(mcspi_dma->dma_tx);
-@@ -1005,20 +997,40 @@ static int omap2_mcspi_request_dma(struct spi_device *spi)
+@@ -1004,20 +996,40 @@ static int omap2_mcspi_request_dma(struc
                mcspi_dma->dma_rx = NULL;
        }
  
@@ -101,7 +99,7 @@ index e9bc9cf984d60..e9e256718ef4a 100644
        if (!cs) {
                cs = kzalloc(sizeof *cs, GFP_KERNEL);
                if (!cs)
-@@ -1043,13 +1055,6 @@ static int omap2_mcspi_setup(struct spi_device *spi)
+@@ -1042,13 +1054,6 @@ static int omap2_mcspi_setup(struct spi_
                }
        }
  
@@ -115,7 +113,7 @@ index e9bc9cf984d60..e9e256718ef4a 100644
        ret = pm_runtime_get_sync(mcspi->dev);
        if (ret < 0) {
                pm_runtime_put_noidle(mcspi->dev);
-@@ -1066,12 +1071,8 @@ static int omap2_mcspi_setup(struct spi_device *spi)
+@@ -1065,12 +1070,8 @@ static int omap2_mcspi_setup(struct spi_
  
  static void omap2_mcspi_cleanup(struct spi_device *spi)
  {
@@ -128,7 +126,7 @@ index e9bc9cf984d60..e9e256718ef4a 100644
        if (spi->controller_state) {
                /* Unlink controller state from context save list */
                cs = spi->controller_state;
-@@ -1080,19 +1081,6 @@ static void omap2_mcspi_cleanup(struct spi_device *spi)
+@@ -1079,19 +1080,6 @@ static void omap2_mcspi_cleanup(struct s
                kfree(cs);
        }
  
@@ -148,7 +146,7 @@ index e9bc9cf984d60..e9e256718ef4a 100644
        if (gpio_is_valid(spi->cs_gpio))
                gpio_free(spi->cs_gpio);
  }
-@@ -1303,6 +1291,9 @@ static bool omap2_mcspi_can_dma(struct spi_master *master,
+@@ -1302,6 +1290,9 @@ static bool omap2_mcspi_can_dma(struct s
        if (spi_controller_is_slave(master))
                return true;
  
@@ -158,7 +156,7 @@ index e9bc9cf984d60..e9e256718ef4a 100644
        return (xfer->len >= DMA_MIN_BYTES);
  }
  
-@@ -1490,6 +1481,11 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
+@@ -1464,6 +1455,11 @@ static int omap2_mcspi_probe(struct plat
        for (i = 0; i < master->num_chipselect; i++) {
                sprintf(mcspi->dma_channels[i].dma_rx_ch_name, "rx%d", i);
                sprintf(mcspi->dma_channels[i].dma_tx_ch_name, "tx%d", i);
@@ -170,7 +168,7 @@ index e9bc9cf984d60..e9e256718ef4a 100644
        }
  
        status = platform_get_irq(pdev, 0);
-@@ -1527,6 +1523,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
+@@ -1501,6 +1497,7 @@ disable_pm:
        pm_runtime_put_sync(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
  free_master:
@@ -178,7 +176,7 @@ index e9bc9cf984d60..e9e256718ef4a 100644
        spi_master_put(master);
        return status;
  }
-@@ -1536,6 +1533,8 @@ static int omap2_mcspi_remove(struct platform_device *pdev)
+@@ -1510,6 +1507,8 @@ static int omap2_mcspi_remove(struct pla
        struct spi_master *master = platform_get_drvdata(pdev);
        struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
  
@@ -187,6 +185,3 @@ index e9bc9cf984d60..e9e256718ef4a 100644
        pm_runtime_dont_use_autosuspend(mcspi->dev);
        pm_runtime_put_sync(mcspi->dev);
        pm_runtime_disable(&pdev->dev);
--- 
-2.20.1
-