mmc: bcm2835: Deduplicate reset of driver data on remove [Linux 5.1]

mmc: bcm2835: Deduplicate reset of driver data on remove [Linux 5.1]

This Linux kernel change "mmc: bcm2835: Deduplicate reset of driver data on remove" is included in the Linux 5.1 release. This change is authored by Lukas Wunner <lukas [at] wunner.de> on Sun Feb 3 09:27:00 2019 +0100. The commit for this change in Linux stable tree is 9cda3e7 (patch).

mmc: bcm2835: Deduplicate reset of driver data on remove

The BCM2835 MMC host driver sets the device's driver data pointer to
NULL on ->remove() even though the driver core subsequently does the
same in __device_release_driver().  Drop the duplicate assignment.

Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: Frank Pavlic <f.pavlic@kunbus.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/mmc/host/bcm2835.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index 246c8ec..7e0d3a49 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1455,7 +1455,6 @@ static int bcm2835_remove(struct platform_device *pdev)
        dma_release_channel(host->dma_chan_rxtx);

    mmc_free_host(mmc);
-   platform_set_drvdata(pdev, NULL);

    return 0;
 }

Leave a Reply

Your email address will not be published. Required fields are marked *