#include <linux/fs.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/vmalloc.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/blktrans.h>
#include <linux/mutex.h>
#include <linux/major.h>
struct mtdblk_dev { … };
static int erase_write (struct mtd_info *mtd, unsigned long pos,
unsigned int len, const char *buf)
{ … }
static int write_cached_data (struct mtdblk_dev *mtdblk)
{ … }
static int do_cached_write (struct mtdblk_dev *mtdblk, unsigned long pos,
int len, const char *buf)
{ … }
static int do_cached_read (struct mtdblk_dev *mtdblk, unsigned long pos,
int len, char *buf)
{ … }
static int mtdblock_readsect(struct mtd_blktrans_dev *dev,
unsigned long block, char *buf)
{ … }
static int mtdblock_writesect(struct mtd_blktrans_dev *dev,
unsigned long block, char *buf)
{ … }
static int mtdblock_open(struct mtd_blktrans_dev *mbd)
{ … }
static void mtdblock_release(struct mtd_blktrans_dev *mbd)
{ … }
static int mtdblock_flush(struct mtd_blktrans_dev *dev)
{ … }
static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
{ … }
static void mtdblock_remove_dev(struct mtd_blktrans_dev *dev)
{ … }
static struct mtd_blktrans_ops mtdblock_tr = …;
module_mtd_blktrans(…);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;