mtd: nand: drop unnecessary partition parser data
[deliverable/linux.git] / drivers / staging / mt29f_spinand / mt29f_spinand.c
index 405b643189fd5cac9148e45e5f9d1c0d4bd94b90..49807de7d91eb1a5860331cdc91907a61d96387e 100644 (file)
@@ -853,7 +853,6 @@ static int spinand_probe(struct spi_device *spi_nand)
        struct nand_chip *chip;
        struct spinand_info *info;
        struct spinand_state *state;
-       struct mtd_part_parser_data ppdata;
 
        info  = devm_kzalloc(&spi_nand->dev, sizeof(struct spinand_info),
                        GFP_KERNEL);
@@ -897,6 +896,7 @@ static int spinand_probe(struct spi_device *spi_nand)
                pr_info("%s: disable ecc failed!\n", __func__);
 #endif
 
+       nand_set_flash_node(chip, spi_nand->dev.of_node);
        chip->priv      = info;
        chip->read_buf  = spinand_read_buf;
        chip->write_buf = spinand_write_buf;
@@ -919,8 +919,7 @@ static int spinand_probe(struct spi_device *spi_nand)
        if (nand_scan(mtd, 1))
                return -ENXIO;
 
-       ppdata.of_node = spi_nand->dev.of_node;
-       return mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0);
+       return mtd_device_register(mtd, NULL, 0);
 }
 
 /*
This page took 0.024235 seconds and 5 git commands to generate.