projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ar71xx: ag71xx: allow to use port 5 of the AR934x built-in switch
[openwrt.git]
/
target
/
linux
/
ar71xx
/
files
/
drivers
/
mtd
/
nand
/
rb4xx_nand.c
diff --git
a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
index
d6c6843
..
1cb8f82
100644
(file)
--- a/
target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
+++ b/
target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c
@@
-12,6
+12,8
@@
* by the Free Software Foundation.
*/
* by the Free Software Foundation.
*/
+#include <linux/kernel.h>
+#include <linux/module.h>
#include <linux/init.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/mtd.h>
#include <linux/init.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/mtd.h>
@@
-22,8
+24,8
@@
#include <linux/gpio.h>
#include <linux/slab.h>
#include <linux/gpio.h>
#include <linux/slab.h>
-#include <asm/mach-a
r71xx/ar71xx
.h>
-#include <asm/mach-a
r71xx
/rb4xx_cpld.h>
+#include <asm/mach-a
th79/ath79
.h>
+#include <asm/mach-a
th79
/rb4xx_cpld.h>
#define DRV_NAME "rb4xx-nand"
#define DRV_VERSION "0.2.0"
#define DRV_NAME "rb4xx-nand"
#define DRV_VERSION "0.2.0"
@@
-134,7
+136,7
@@
static void rb4xx_nand_read_buf(struct mtd_info *mtd, unsigned char *buf,
pr_err("rb4xx_nand: read buf failed, err=%d\n", err);
}
pr_err("rb4xx_nand: read buf failed, err=%d\n", err);
}
-static int __init rb4xx_nand_probe(struct platform_device *pdev)
+static int __
dev
init rb4xx_nand_probe(struct platform_device *pdev)
{
struct rb4xx_nand_info *info;
int ret;
{
struct rb4xx_nand_info *info;
int ret;
@@
-223,7
+225,7
@@
static int __init rb4xx_nand_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, info);
platform_set_drvdata(pdev, info);
- ret = nand_scan_ident(&info->mtd, 1);
+ ret = nand_scan_ident(&info->mtd, 1
, NULL
);
if (ret) {
ret = -ENXIO;
goto err_free_info;
if (ret) {
ret = -ENXIO;
goto err_free_info;
@@
-238,12
+240,8
@@
static int __init rb4xx_nand_probe(struct platform_device *pdev)
goto err_set_drvdata;
}
goto err_set_drvdata;
}
-#ifdef CONFIG_MTD_PARTITIONS
- ret = add_mtd_partitions(&info->mtd, rb4xx_nand_partitions,
+ mtd_device_register(&info->mtd, rb4xx_nand_partitions,
ARRAY_SIZE(rb4xx_nand_partitions));
ARRAY_SIZE(rb4xx_nand_partitions));
-#else
- ret = add_mtd_device(&info->mtd);
-#endif
if (ret)
goto err_release_nand;
if (ret)
goto err_release_nand;
This page took
0.031134 seconds
and
4
git commands to generate.