#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/platnand.h>
struct plat_nand_data { … };
static int plat_nand_attach_chip(struct nand_chip *chip)
{ … }
static const struct nand_controller_ops plat_nand_ops = …;
static int plat_nand_probe(struct platform_device *pdev)
{ … }
static void plat_nand_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id plat_nand_match[] = …;
MODULE_DEVICE_TABLE(of, plat_nand_match);
static struct platform_driver plat_nand_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;