Seperate drivers and tags handlers into their own interface structures
[yaffs2.git] / yaffs_mtdif_multi.c
index 7968c3f..e61699d 100644 (file)
@@ -88,7 +88,7 @@ static        int yaffs_mtd_write(struct yaffs_dev *dev, int nand_chunk,
 static int yaffs_mtd_read(struct yaffs_dev *dev, int nand_chunk,
                                   u8 *data, int data_len,
                                   u8 *oob, int oob_len,
-                                  int *ecc_result)
+                                  enum yaffs_ecc_result *ecc_result)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        loff_t addr;
@@ -211,13 +211,13 @@ static int yaffs_mtd_deinitialise(struct yaffs_dev *dev)
 
 void yaffs_mtd_drv_install(struct yaffs_dev *dev)
 {
-       struct yaffs_param *param = &dev->param;
-
-       param->drv_write_chunk_fn = yaffs_mtd_write;
-       param->drv_read_chunk_fn = yaffs_mtd_read;
-       param->drv_erase_fn = yaffs_mtd_erase;
-       param->drv_mark_bad_fn = yaffs_mtd_mark_bad;
-       param->drv_check_bad_fn = yaffs_mtd_check_bad;
-       param->drv_initialise_fn = yaffs_mtd_initialise;
-       param->drv_deinitialise_fn = yaffs_mtd_deinitialise;
+       struct yaffs_driver *drv = &dev->drv;
+
+       drv->drv_write_chunk_fn = yaffs_mtd_write;
+       drv->drv_read_chunk_fn = yaffs_mtd_read;
+       drv->drv_erase_fn = yaffs_mtd_erase;
+       drv->drv_mark_bad_fn = yaffs_mtd_mark_bad;
+       drv->drv_check_bad_fn = yaffs_mtd_check_bad;
+       drv->drv_initialise_fn = yaffs_mtd_initialise;
+       drv->drv_deinitialise_fn = yaffs_mtd_deinitialise;
 }