mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-01 19:46:51 +00:00
kernel: fix nand_release() usage.
nand_release() takes nand_chip since commit 5bcfcbfc4019 ("mtd: rawnand:
Pass a nand_chip object to nand_release()")
Fixes: f4985a22ca
("kernel: Update kernel 4.14 to version 4.14.187")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
820f4654c6
commit
9cad70044f
@ -1566,7 +1566,7 @@ ar934x_nfc_remove(struct platform_device *pdev)
|
|||||||
nfc = platform_get_drvdata(pdev);
|
nfc = platform_get_drvdata(pdev);
|
||||||
if (nfc) {
|
if (nfc) {
|
||||||
mtd = ar934x_nfc_to_mtd(nfc);
|
mtd = ar934x_nfc_to_mtd(nfc);
|
||||||
nand_release(mtd);
|
nand_release(&nfc->nand_chip);
|
||||||
ar934x_nfc_free_buf(nfc);
|
ar934x_nfc_free_buf(nfc);
|
||||||
free_irq(nfc->irq, nfc);
|
free_irq(nfc->irq, nfc);
|
||||||
}
|
}
|
||||||
|
@ -335,7 +335,7 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_release_nand:
|
err_release_nand:
|
||||||
nand_release(mtd);
|
nand_release(&info->chip);
|
||||||
err_set_drvdata:
|
err_set_drvdata:
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
err_free_info:
|
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);
|
struct rb4xx_nand_info *info = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
nand_release(rbinfo_to_mtd(info));
|
nand_release(&info->chip));
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
kfree(info);
|
kfree(info);
|
||||||
gpio_free(RB4XX_NAND_GPIO_NCE);
|
gpio_free(RB4XX_NAND_GPIO_NCE);
|
||||||
|
@ -393,7 +393,7 @@ static int rb750_nand_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_release_nand:
|
err_release_nand:
|
||||||
nand_release(mtd);
|
nand_release(&info->chip);
|
||||||
err_set_drvdata:
|
err_set_drvdata:
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
err_free_info:
|
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);
|
struct rb750_nand_info *info = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
nand_release(rbinfo_to_mtd(info));
|
nand_release(&info->chip);
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
kfree(info);
|
kfree(info);
|
||||||
|
|
||||||
|
@ -434,7 +434,7 @@ static int rb91x_nand_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_release_nand:
|
err_release_nand:
|
||||||
nand_release(mtd);
|
nand_release(&rbni->chip);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -442,7 +442,7 @@ static int rb91x_nand_remove(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
struct rb91x_nand_info *info = platform_get_drvdata(pdev);
|
struct rb91x_nand_info *info = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
nand_release(rbinfo_to_mtd(info));
|
nand_release(&rbni->chip);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ Signed-off-by: Luke Wren <wren6991@gmail.com>
|
|||||||
+ if (!ret)
|
+ if (!ret)
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+
|
+
|
||||||
+ nand_release(mtd);
|
+ nand_release(this);
|
||||||
+ return -EINVAL;
|
+ return -EINVAL;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
@ -320,7 +320,7 @@ Signed-off-by: Luke Wren <wren6991@gmail.com>
|
|||||||
+{
|
+{
|
||||||
+ struct bcm2835_smi_nand_host *host = platform_get_drvdata(pdev);
|
+ struct bcm2835_smi_nand_host *host = platform_get_drvdata(pdev);
|
||||||
+
|
+
|
||||||
+ nand_release(&host->mtd);
|
+ nand_release(&host->nand_chip);
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
|
@ -3590,7 +3590,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
+
|
+
|
||||||
+out:
|
+out:
|
||||||
+ MSG(INIT, "[NFI] mtk_nand_probe fail, err = %d!\n", err);
|
+ MSG(INIT, "[NFI] mtk_nand_probe fail, err = %d!\n", err);
|
||||||
+ nand_release(mtd);
|
+ nand_release(nand_chip);
|
||||||
+ platform_set_drvdata(pdev, NULL);
|
+ platform_set_drvdata(pdev, NULL);
|
||||||
+ kfree(host);
|
+ kfree(host);
|
||||||
+ nand_disable_clock();
|
+ nand_disable_clock();
|
||||||
@ -3604,7 +3604,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
+ struct mtd_info *mtd = host->mtd;
|
+ struct mtd_info *mtd = host->mtd;
|
||||||
+ struct nand_chip *nand_chip = &host->nand_chip;
|
+ struct nand_chip *nand_chip = &host->nand_chip;
|
||||||
+
|
+
|
||||||
+ nand_release(mtd);
|
+ nand_release(nand_chip);
|
||||||
+ kfree(host);
|
+ kfree(host);
|
||||||
+ nand_disable_clock();
|
+ nand_disable_clock();
|
||||||
+
|
+
|
||||||
|
@ -468,9 +468,8 @@ static int s5p_nand_probe(struct platform_device *pdev)
|
|||||||
static int s5p_nand_remove(struct platform_device *pdev)
|
static int s5p_nand_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct s5p_nand_host *host = platform_get_drvdata(pdev);
|
struct s5p_nand_host *host = platform_get_drvdata(pdev);
|
||||||
struct mtd_info *mtd = nand_to_mtd(&host->nand_chip);
|
|
||||||
|
|
||||||
nand_release(mtd);
|
nand_release(&host->nand_chip);
|
||||||
clk_disable_unprepare(host->clk[0]); /* nandxl */
|
clk_disable_unprepare(host->clk[0]); /* nandxl */
|
||||||
clk_disable_unprepare(host->clk[1]); /* nand */
|
clk_disable_unprepare(host->clk[1]); /* nand */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user