mtd: nand: make use of nand_set/get_controller_data() helpers
[deliverable/linux.git] / drivers / mtd / nand / orion_nand.c
index 2c2be612448e7e6c423eb93346489ccb3a054cbd..d4614bfbfed6c1c63b95fec88c2af2c96dedd182 100644 (file)
@@ -26,7 +26,7 @@
 static void orion_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
        struct nand_chip *nc = mtd_to_nand(mtd);
-       struct orion_nand_data *board = nc->priv;
+       struct orion_nand_data *board = nand_get_controller_data(nc);
        u32 offs;
 
        if (cmd == NAND_CMD_NONE)
@@ -124,7 +124,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)
 
        mtd->dev.parent = &pdev->dev;
 
-       nc->priv = board;
+       nand_set_controller_data(nc, board);
        nand_set_flash_node(nc, pdev->dev.of_node);
        nc->IO_ADDR_R = nc->IO_ADDR_W = io_base;
        nc->cmd_ctrl = orion_nand_cmd_ctrl;
This page took 0.025533 seconds and 5 git commands to generate.