#define PRERELEASE
#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/errno.h>
#include <asm/io.h>
#include <linux/uaccess.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/hdreg.h>
#include <linux/blkdev.h>
#include <linux/kmod.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/rawnand.h>
#include <linux/mtd/nftl.h>
#include <linux/mtd/blktrans.h>
#define MAX_LOOPS …
static void nftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
{ … }
static void nftl_remove_dev(struct mtd_blktrans_dev *dev)
{ … }
int nftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len,
size_t *retlen, uint8_t *buf)
{ … }
int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
size_t *retlen, uint8_t *buf)
{ … }
#ifdef CONFIG_NFTL_RW
static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
size_t *retlen, uint8_t *buf, uint8_t *oob)
{ … }
static u16 NFTL_findfreeblock(struct NFTLrecord *nftl, int desperate )
{ … }
static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned pendingblock )
{ … }
static u16 NFTL_makefreeblock( struct NFTLrecord *nftl , unsigned pendingblock)
{ … }
static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block)
{ … }
static int nftl_writeblock(struct mtd_blktrans_dev *mbd, unsigned long block,
char *buffer)
{ … }
#endif
static int nftl_readblock(struct mtd_blktrans_dev *mbd, unsigned long block,
char *buffer)
{ … }
static int nftl_getgeo(struct mtd_blktrans_dev *dev, struct hd_geometry *geo)
{ … }
static struct mtd_blktrans_ops nftl_tr = …;
module_mtd_blktrans(…);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS_BLOCKDEV_MAJOR(…);