aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-07-04 20:36:16 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2020-07-04 21:04:11 +0200
commit9cad70044f750e299caf77fdea93ecccc66c6cfc (patch)
tree3d5dbcf8a0bf0c60a46c47845b4667730595e09f /target
parent820f4654c68af59589773340bea8b2cef11afc60 (diff)
downloadupstream-9cad70044f750e299caf77fdea93ecccc66c6cfc.tar.gz
upstream-9cad70044f750e299caf77fdea93ecccc66c6cfc.tar.bz2
upstream-9cad70044f750e299caf77fdea93ecccc66c6cfc.zip
kernel: fix nand_release() usage.
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>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c2
-rw-r--r--target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c4
-rw-r--r--target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c4
-rw-r--r--target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c4
-rw-r--r--target/linux/brcm2708/patches-4.14/950-0047-Add-SMI-NAND-driver.patch4
-rw-r--r--target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch4
-rw-r--r--target/linux/samsung/files-4.14/drivers/mtd/nand/s5pxx_nand.c3
7 files changed, 12 insertions, 13 deletions
diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
index 26f14fdac6..2e25c6b885 100644
--- a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
+++ b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
@@ -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);
}
diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
index 717a94237c..3479d5cc65 100644
--- a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
+++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
@@ -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);
diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c
index 74f7f2913e..a578c54ad3 100644
--- a/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c
+++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c
@@ -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);
diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c
index 943b8e935e..f5a31bf58f 100644
--- a/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c
+++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb91x_nand.c
@@ -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;
}
diff --git a/target/linux/brcm2708/patches-4.14/950-0047-Add-SMI-NAND-driver.patch b/target/linux/brcm2708/patches-4.14/950-0047-Add-SMI-NAND-driver.patch
index 847a73ad3d..a4d1d9e3d0 100644
--- a/target/linux/brcm2708/patches-4.14/950-0047-Add-SMI-NAND-driver.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0047-Add-SMI-NAND-driver.patch
@@ -312,7 +312,7 @@ Signed-off-by: Luke Wren <wren6991@gmail.com>
+ if (!ret)
+ return 0;
+
-+ nand_release(mtd);
++ nand_release(this);
+ return -EINVAL;
+}
+
@@ -320,7 +320,7 @@ Signed-off-by: Luke Wren <wren6991@gmail.com>
+{
+ struct bcm2835_smi_nand_host *host = platform_get_drvdata(pdev);
+
-+ nand_release(&host->mtd);
++ nand_release(&host->nand_chip);
+
+ return 0;
+}
diff --git a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch
index 03b2b36db9..66980a8472 100644
--- a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch
+++ b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch
@@ -3590,7 +3590,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
+out:
+ MSG(INIT, "[NFI] mtk_nand_probe fail, err = %d!\n", err);
-+ nand_release(mtd);
++ nand_release(nand_chip);
+ platform_set_drvdata(pdev, NULL);
+ kfree(host);
+ nand_disable_clock();
@@ -3604,7 +3604,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ struct mtd_info *mtd = host->mtd;
+ struct nand_chip *nand_chip = &host->nand_chip;
+
-+ nand_release(mtd);
++ nand_release(nand_chip);
+ kfree(host);
+ nand_disable_clock();
+
diff --git a/target/linux/samsung/files-4.14/drivers/mtd/nand/s5pxx_nand.c b/target/linux/samsung/files-4.14/drivers/mtd/nand/s5pxx_nand.c
index 26ec75dd19..2ac305639d 100644
--- a/target/linux/samsung/files-4.14/drivers/mtd/nand/s5pxx_nand.c
+++ b/target/linux/samsung/files-4.14/drivers/mtd/nand/s5pxx_nand.c
@@ -468,9 +468,8 @@ static int s5p_nand_probe(struct platform_device *pdev)
static int s5p_nand_remove(struct platform_device *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[1]); /* nand */