mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
mtd: rawnand: davinci: Inherit from nand_controller
Let's not rely on the dummy_controller embedded in nand_chip.legacy and explicitly inherit from nand_controller instead. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200513172248.141402-1-boris.brezillon@collabora.com
This commit is contained in:
parent
dcb351c03f
commit
3626fdcf09
@ -38,6 +38,7 @@
|
|||||||
* outputs in a "wire-AND" configuration, with no per-chip signals.
|
* outputs in a "wire-AND" configuration, with no per-chip signals.
|
||||||
*/
|
*/
|
||||||
struct davinci_nand_info {
|
struct davinci_nand_info {
|
||||||
|
struct nand_controller controller;
|
||||||
struct nand_chip chip;
|
struct nand_chip chip;
|
||||||
|
|
||||||
struct platform_device *pdev;
|
struct platform_device *pdev;
|
||||||
@ -788,7 +789,9 @@ static int nand_davinci_probe(struct platform_device *pdev)
|
|||||||
spin_unlock_irq(&davinci_nand_lock);
|
spin_unlock_irq(&davinci_nand_lock);
|
||||||
|
|
||||||
/* Scan to find existence of the device(s) */
|
/* Scan to find existence of the device(s) */
|
||||||
info->chip.legacy.dummy_controller.ops = &davinci_nand_controller_ops;
|
nand_controller_init(&info->controller);
|
||||||
|
info->controller.ops = &davinci_nand_controller_ops;
|
||||||
|
info->chip.controller = &info->controller;
|
||||||
ret = nand_scan(&info->chip, pdata->mask_chipsel ? 2 : 1);
|
ret = nand_scan(&info->chip, pdata->mask_chipsel ? 2 : 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_dbg(&pdev->dev, "no NAND chip(s) found\n");
|
dev_dbg(&pdev->dev, "no NAND chip(s) found\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user