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>
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);
}
return 0;
err_release_nand:
- nand_release(mtd);
+ nand_release(&info->chip);
err_set_drvdata:
platform_set_drvdata(pdev, NULL);
err_free_info:
{
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);
return 0;
err_release_nand:
- nand_release(mtd);
+ nand_release(&info->chip);
err_set_drvdata:
platform_set_drvdata(pdev, NULL);
err_free_info:
{
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);
return 0;
err_release_nand:
- nand_release(mtd);
+ nand_release(&rbni->chip);
return ret;
}
{
struct rb91x_nand_info *info = platform_get_drvdata(pdev);
- nand_release(rbinfo_to_mtd(info));
+ nand_release(&rbni->chip);
return 0;
}