mtd/drivers/mtd/nand autcpu12.c,1.23,1.24 s3c2410.c,1.20,1.21
gleixner at infradead.org
gleixner at infradead.org
Tue Nov 29 15:01:33 EST 2005
- Previous message: mtd/drivers/mtd/maps lubbock-flash.c, 1.22, 1.23 mainstone-flash.c,
1.5, 1.6 Kconfig, 1.65, 1.66 Makefile.common, 1.37,
1.38 amd76xrom.c, 1.21, 1.22 bast-flash.c, 1.5, 1.6 ceiva.c,
1.12, 1.13 ebony.c, 1.16, 1.17 ichxrom.c, 1.19,
1.20 integrator-flash.c, 1.20, 1.21 ipaq-flash.c, 1.6,
1.7 iq80310.c, 1.21, 1.22 ixp2000.c, 1.10, 1.11 ixp4xx.c, 1.13,
1.14 ocotea.c, 1.3, 1.4 omap-toto-flash.c, 1.5, 1.6 omap_nor.c,
1.3, 1.4 plat-ram.c, 1.7, 1.8 sa1100-flash.c, 1.51,
1.52 sun_uflash.c, 1.13, 1.14 tqm8xxl.c, 1.15,
1.16 ts5500_flash.c, 1.5, 1.6 walnut.c, 1.3,
1.4 pxa2xx-flash.c, 1.1, NONE
- Next message: mtd/include/linux/mtd cfi.h,1.57,1.58 mtd.h,1.61,1.62
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv14005/drivers/mtd/nand
Modified Files:
autcpu12.c s3c2410.c
Log Message:
Big mainline sync: Driver model updates, kfree fixup, version.h removals
Index: autcpu12.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/autcpu12.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- autcpu12.c 7 Nov 2005 11:14:30 -0000 1.23
+++ autcpu12.c 29 Nov 2005 20:01:29 -0000 1.24
@@ -27,7 +27,6 @@
* 10-06-2002 TG 128K card support added
*/
-#include <linux/version.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/module.h>
Index: s3c2410.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/s3c2410.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- s3c2410.c 7 Nov 2005 11:14:31 -0000 1.20
+++ s3c2410.c 29 Nov 2005 20:01:29 -0000 1.21
@@ -125,14 +125,14 @@
return s3c2410_nand_mtd_toours(mtd)->info;
}
-static struct s3c2410_nand_info *to_nand_info(struct device *dev)
+static struct s3c2410_nand_info *to_nand_info(struct platform_device *dev)
{
- return dev_get_drvdata(dev);
+ return platform_get_drvdata(dev);
}
-static struct s3c2410_platform_nand *to_nand_plat(struct device *dev)
+static struct s3c2410_platform_nand *to_nand_plat(struct platform_device *dev)
{
- return dev->platform_data;
+ return dev->dev.platform_data;
}
/* timing calculations */
@@ -165,9 +165,9 @@
/* controller setup */
static int s3c2410_nand_inithw(struct s3c2410_nand_info *info,
- struct device *dev)
+ struct platform_device *pdev)
{
- struct s3c2410_platform_nand *plat = to_nand_plat(dev);
+ struct s3c2410_platform_nand *plat = to_nand_plat(pdev);
unsigned long clkrate = clk_get_rate(info->clk);
int tacls, twrph0, twrph1;
unsigned long cfg;
@@ -430,11 +430,11 @@
/* device management functions */
-static int s3c2410_nand_remove(struct device *dev)
+static int s3c2410_nand_remove(struct platform_device *pdev)
{
- struct s3c2410_nand_info *info = to_nand_info(dev);
+ struct s3c2410_nand_info *info = to_nand_info(pdev);
- dev_set_drvdata(dev, NULL);
+ platform_set_drvdata(pdev, NULL);
if (info == NULL)
return 0;
@@ -562,10 +562,9 @@
* nand layer to look for devices
*/
-static int s3c24xx_nand_probe(struct device *dev, int is_s3c2440)
+static int s3c24xx_nand_probe(struct platform_device *pdev, int is_s3c2440)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct s3c2410_platform_nand *plat = to_nand_plat(dev);
+ struct s3c2410_platform_nand *plat = to_nand_plat(pdev);
struct s3c2410_nand_info *info;
struct s3c2410_nand_mtd *nmtd;
struct s3c2410_nand_set *sets;
@@ -575,26 +574,26 @@
int nr_sets;
int setno;
- pr_debug("s3c2410_nand_probe(%p)\n", dev);
+ pr_debug("s3c2410_nand_probe(%p)\n", pdev);
info = kmalloc(sizeof(*info), GFP_KERNEL);
if (info == NULL) {
- dev_err(dev, "no memory for flash info\n");
+ dev_err(&pdev->dev, "no memory for flash info\n");
err = -ENOMEM;
goto exit_error;
}
memzero(info, sizeof(*info));
- dev_set_drvdata(dev, info);
+ platform_set_drvdata(pdev, info);
spin_lock_init(&info->controller.lock);
init_waitqueue_head(&info->controller.wq);
/* get the clock source and enable it */
- info->clk = clk_get(dev, "nand");
+ info->clk = clk_get(&pdev->dev, "nand");
if (IS_ERR(info->clk)) {
- dev_err(dev, "failed to get clock");
+ dev_err(&pdev->dev, "failed to get clock");
err = -ENOENT;
goto exit_error;
}
@@ -611,27 +610,27 @@
info->area = request_mem_region(res->start, size, pdev->name);
if (info->area == NULL) {
- dev_err(dev, "cannot reserve register region\n");
+ dev_err(&pdev->dev, "cannot reserve register region\n");
err = -ENOENT;
goto exit_error;
}
- info->device = dev;
+ info->device = &pdev->dev;
info->platform = plat;
info->regs = ioremap(res->start, size);
info->is_s3c2440 = is_s3c2440;
if (info->regs == NULL) {
- dev_err(dev, "cannot reserve register region\n");
+ dev_err(&pdev->dev, "cannot reserve register region\n");
err = -EIO;
goto exit_error;
}
- dev_dbg(dev, "mapped registers at %p\n", info->regs);
+ dev_dbg(&pdev->dev, "mapped registers at %p\n", info->regs);
/* initialise the hardware */
- err = s3c2410_nand_inithw(info, dev);
+ err = s3c2410_nand_inithw(info, pdev);
if (err != 0)
goto exit_error;
@@ -645,7 +644,7 @@
size = nr_sets * sizeof(*info->mtds);
info->mtds = kmalloc(size, GFP_KERNEL);
if (info->mtds == NULL) {
- dev_err(dev, "failed to allocate mtd storage\n");
+ dev_err(&pdev->dev, "failed to allocate mtd storage\n");
err = -ENOMEM;
goto exit_error;
}
@@ -677,7 +676,7 @@
return 0;
exit_error:
- s3c2410_nand_remove(dev);
+ s3c2410_nand_remove(pdev);
if (err == 0)
err = -EINVAL;
@@ -686,44 +685,46 @@
/* driver device registration */
-static int s3c2410_nand_probe(struct device *dev)
+static int s3c2410_nand_probe(struct platform_device *dev)
{
return s3c24xx_nand_probe(dev, 0);
}
-static int s3c2440_nand_probe(struct device *dev)
+static int s3c2440_nand_probe(struct platform_device *dev)
{
return s3c24xx_nand_probe(dev, 1);
}
-static struct device_driver s3c2410_nand_driver = {
- .name = "s3c2410-nand",
- .owner = THIS_MODULE,
- .bus = &platform_bus_type,
+static struct platform_driver s3c2410_nand_driver = {
.probe = s3c2410_nand_probe,
.remove = s3c2410_nand_remove,
+ .driver = {
+ .name = "s3c2410-nand",
+ .owner = THIS_MODULE,
+ },
};
-static struct device_driver s3c2440_nand_driver = {
- .name = "s3c2440-nand",
- .owner = THIS_MODULE,
- .bus = &platform_bus_type,
+static struct platform_driver s3c2440_nand_driver = {
.probe = s3c2440_nand_probe,
.remove = s3c2410_nand_remove,
+ .driver = {
+ .name = "s3c2440-nand",
+ .owner = THIS_MODULE,
+ },
};
static int __init s3c2410_nand_init(void)
{
printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n");
- driver_register(&s3c2440_nand_driver);
- return driver_register(&s3c2410_nand_driver);
+ platform_driver_register(&s3c2440_nand_driver);
+ return platform_driver_register(&s3c2410_nand_driver);
}
static void __exit s3c2410_nand_exit(void)
{
- driver_unregister(&s3c2440_nand_driver);
- driver_unregister(&s3c2410_nand_driver);
+ platform_driver_unregister(&s3c2440_nand_driver);
+ platform_driver_unregister(&s3c2410_nand_driver);
}
module_init(s3c2410_nand_init);
- Previous message: mtd/drivers/mtd/maps lubbock-flash.c, 1.22, 1.23 mainstone-flash.c,
1.5, 1.6 Kconfig, 1.65, 1.66 Makefile.common, 1.37,
1.38 amd76xrom.c, 1.21, 1.22 bast-flash.c, 1.5, 1.6 ceiva.c,
1.12, 1.13 ebony.c, 1.16, 1.17 ichxrom.c, 1.19,
1.20 integrator-flash.c, 1.20, 1.21 ipaq-flash.c, 1.6,
1.7 iq80310.c, 1.21, 1.22 ixp2000.c, 1.10, 1.11 ixp4xx.c, 1.13,
1.14 ocotea.c, 1.3, 1.4 omap-toto-flash.c, 1.5, 1.6 omap_nor.c,
1.3, 1.4 plat-ram.c, 1.7, 1.8 sa1100-flash.c, 1.51,
1.52 sun_uflash.c, 1.13, 1.14 tqm8xxl.c, 1.15,
1.16 ts5500_flash.c, 1.5, 1.6 walnut.c, 1.3,
1.4 pxa2xx-flash.c, 1.1, NONE
- Next message: mtd/include/linux/mtd cfi.h,1.57,1.58 mtd.h,1.61,1.62
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the linux-mtd-cvs
mailing list