1 #include <linux/kernel.h>
2 #include <linux/module.h>
3 #include <linux/slab.h>
11 static const char *probes[] = {
"bcm47xxpart",
NULL };
13 static int bcm47xxsflash_read(
struct mtd_info *mtd, loff_t
from,
size_t len,
16 struct bcma_sflash *sflash = mtd->
priv;
19 if ((from + len) > mtd->
size)
28 static void bcm47xxsflash_fill_mtd(
struct bcma_sflash *sflash,
32 mtd->
name =
"bcm47xxsflash";
35 mtd->
size = sflash->size;
36 mtd->
_read = bcm47xxsflash_read;
45 struct bcma_sflash *sflash = dev_get_platdata(&pdev->
dev);
53 bcm47xxsflash_fill_mtd(sflash, sflash->mtd);
57 pr_err(
"Failed to register MTD device: %d\n", err);
71 struct bcma_sflash *sflash = dev_get_platdata(&pdev->
dev);
82 .name =
"bcma_sflash",
87 static int __init bcm47xxsflash_init(
void)
93 pr_err(
"Failed to register BCMA serial flash driver: %d\n",
99 static void __exit bcm47xxsflash_exit(
void)