mtd: nand: make use of mtd_to_nand() in NAND drivers
[deliverable/linux.git] / drivers / mtd / nand / fsl_upm.c
index b3f4a01621c1db9636985ff5d03186f069582c9c..68ec128e822ca175216bdc030a3477025ecc2834 100644 (file)
@@ -79,7 +79,7 @@ static void fun_wait_rnb(struct fsl_upm_nand *fun)
 
 static void fun_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-       struct nand_chip *chip = mtd->priv;
+       struct nand_chip *chip = mtd_to_nand(mtd);
        struct fsl_upm_nand *fun = to_fsl_upm_nand(mtd);
        u32 mar;
 
@@ -109,7 +109,7 @@ static void fun_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 
 static void fun_select_chip(struct mtd_info *mtd, int mchip_nr)
 {
-       struct nand_chip *chip = mtd->priv;
+       struct nand_chip *chip = mtd_to_nand(mtd);
        struct fsl_upm_nand *fun = to_fsl_upm_nand(mtd);
 
        if (mchip_nr == -1) {
This page took 0.025448 seconds and 5 git commands to generate.