kernel: fix nand_release() usage. v1.5.3 v1.5.3-20201002
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 4 Jul 2020 18:36:16 +0000 (20:36 +0200)
committerRISCi_ATOM <bob@bobcall.me>
Fri, 2 Oct 2020 05:18:54 +0000 (01:18 -0400)
nand_release() takes nand_chip since commit 5bcfcbfc4019 ("mtd: rawnand:
Pass a nand_chip object to nand_release()")

Fixes: f4985a22ca1b ("kernel: Update kernel 4.14 to version 4.14.187")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c
target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c

index 26f14fdac6947ae776eca96ee6543939500cb7a8..2e25c6b885635e3f0def3cc9671ab635b2e95278 100644 (file)
@@ -1566,7 +1566,7 @@ ar934x_nfc_remove(struct platform_device *pdev)
        nfc = platform_get_drvdata(pdev);
        if (nfc) {
                mtd = ar934x_nfc_to_mtd(nfc);
-               nand_release(mtd);
+               nand_release(&nfc->nand_chip);
                ar934x_nfc_free_buf(nfc);
                free_irq(nfc->irq, nfc);
        }
index 717a94237c6d54ed3f094f08370acd7f91f5bcd1..3479d5cc6511ab076bba219312b253ef50bd8625 100644 (file)
@@ -335,7 +335,7 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
        return 0;
 
 err_release_nand:
-       nand_release(mtd);
+       nand_release(&info->chip);
 err_set_drvdata:
        platform_set_drvdata(pdev, NULL);
 err_free_info:
@@ -356,7 +356,7 @@ static int rb4xx_nand_remove(struct platform_device *pdev)
 {
        struct rb4xx_nand_info *info = platform_get_drvdata(pdev);
 
-       nand_release(rbinfo_to_mtd(info));
+       nand_release(&info->chip));
        platform_set_drvdata(pdev, NULL);
        kfree(info);
        gpio_free(RB4XX_NAND_GPIO_NCE);
index 74f7f2913ec701f56205052ebbca717c2842e9df..a578c54ad351773c5ad0a423bd8679d1cd85ea98 100644 (file)
@@ -393,7 +393,7 @@ static int rb750_nand_probe(struct platform_device *pdev)
        return 0;
 
 err_release_nand:
-       nand_release(mtd);
+       nand_release(&info->chip);
 err_set_drvdata:
        platform_set_drvdata(pdev, NULL);
 err_free_info:
@@ -405,7 +405,7 @@ static int rb750_nand_remove(struct platform_device *pdev)
 {
        struct rb750_nand_info *info = platform_get_drvdata(pdev);
 
-       nand_release(rbinfo_to_mtd(info));
+       nand_release(&info->chip);
        platform_set_drvdata(pdev, NULL);
        kfree(info);
 
index 943b8e935e0645d55c3a2bbf505f29315d070477..f5a31bf58f345459b3111df41990a96c880142d9 100644 (file)
@@ -434,7 +434,7 @@ static int rb91x_nand_probe(struct platform_device *pdev)
        return 0;
 
 err_release_nand:
-       nand_release(mtd);
+       nand_release(&rbni->chip);
        return ret;
 }
 
@@ -442,7 +442,7 @@ static int rb91x_nand_remove(struct platform_device *pdev)
 {
        struct rb91x_nand_info *info = platform_get_drvdata(pdev);
 
-       nand_release(rbinfo_to_mtd(info));
+       nand_release(&rbni->chip);
 
        return 0;
 }