mtd: nand: gpmi: use the mtd instance embedded in struct nand_chip
[deliverable/linux.git] / drivers / mtd / nand / sharpsl.c
index 842c47a451a0dcfedd21b28b103804b684212e13..84129e539930182e5710ca27dcd4cc8fbcbd4562 100644 (file)
@@ -66,7 +66,7 @@ static void sharpsl_nand_hwcontrol(struct mtd_info *mtd, int cmd,
                                   unsigned int ctrl)
 {
        struct sharpsl_nand *sharpsl = mtd_to_sharpsl(mtd);
-       struct nand_chip *chip = mtd->priv;
+       struct nand_chip *chip = mtd_to_nand(mtd);
 
        if (ctrl & NAND_CTRL_CHANGE) {
                unsigned char bits = ctrl & 0x07;
@@ -144,7 +144,7 @@ static int sharpsl_nand_probe(struct platform_device *pdev)
 
        /* Link the private data with the MTD structure */
        sharpsl->mtd.priv = this;
-       sharpsl->mtd.owner = THIS_MODULE;
+       sharpsl->mtd.dev.parent = &pdev->dev;
 
        platform_set_drvdata(pdev, sharpsl);
 
This page took 0.026027 seconds and 5 git commands to generate.