diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-5.4.69-amdx86/0009-spi-amd-Fix-refcount-underflow-on-remove.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-5.4.69-amdx86/0009-spi-amd-Fix-refcount-underflow-on-remove.patch | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-5.4.69-amdx86/0009-spi-amd-Fix-refcount-underflow-on-remove.patch b/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-5.4.69-amdx86/0009-spi-amd-Fix-refcount-underflow-on-remove.patch deleted file mode 100644 index 5344b1d6..00000000 --- a/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-5.4.69-amdx86/0009-spi-amd-Fix-refcount-underflow-on-remove.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 2cbb984d07b92762a7e1d32ffbbb965849268cc1 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner <lukas@wunner.de> -Date: Mon, 4 May 2020 13:12:04 +0200 -Subject: [PATCH 09/21] spi: amd: Fix refcount underflow on remove - -The AMD SPI driver calls spi_master_put() in its ->remove() hook even -though the preceding call to spi_unregister_master() already drops a -ref, thus leading to a refcount underflow. Drop the superfluous call -to spi_master_put(). - -This only leaves the call to spi_unregister_master() in the ->remove() -hook, so it's safe to change the ->probe() hook to use the devm version -of spi_register_master() and drop the ->remove() hook altogether. - -Signed-off-by: Lukas Wunner <lukas@wunner.de> -Link: https://lore.kernel.org/r/5e53ccdf1eecd4e015dba99d0d77389107f8a2e3.1588590210.git.lukas@wunner.de -Signed-off-by: Mark Brown <broonie@kernel.org> -Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com> ---- - drivers/spi/spi-amd.c | 13 +------------ - 1 file changed, 1 insertion(+), 12 deletions(-) - -diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c -index f8d008ea112d..489a95fff49e 100755 ---- a/drivers/spi/spi-amd.c -+++ b/drivers/spi/spi-amd.c -@@ -283,7 +283,7 @@ static int amd_spi_probe(struct platform_device *pdev) - master->transfer_one_message = amd_spi_master_transfer; - - /* Register the controller with SPI framework */ -- err = spi_register_master(master); -+ err = devm_spi_register_master(dev, master); - if (err) { - dev_err(dev, "error %d registering SPI controller\n", err); - goto err_free_master; -@@ -297,16 +297,6 @@ static int amd_spi_probe(struct platform_device *pdev) - return err; - } - --static int amd_spi_remove(struct platform_device *pdev) --{ -- struct amd_spi *amd_spi = platform_get_drvdata(pdev); -- -- spi_unregister_master(amd_spi->master); -- spi_master_put(amd_spi->master); -- -- return 0; --} -- - static const struct acpi_device_id spi_acpi_match[] = { - { "AMDI0061", 0 }, - {}, -@@ -319,7 +309,6 @@ static struct platform_driver amd_spi_driver = { - .acpi_match_table = ACPI_PTR(spi_acpi_match), - }, - .probe = amd_spi_probe, -- .remove = amd_spi_remove, - }; - - module_platform_driver(amd_spi_driver); --- -2.17.1 - |