diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 03:28:10 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 03:28:10 +0300 |
commit | 4c5811bf463b0ef82fabbd1708f8bb2d753aeb18 (patch) | |
tree | ff37d31217c3804ca05de21a55a9b5ca1ca818b2 /drivers/mtd | |
parent | f74b9444192c60603020c61d7915b72893137edc (diff) | |
parent | 9f15444fefdb33509132ff5c9be60cb315c44cb2 (diff) | |
download | linux-4c5811bf463b0ef82fabbd1708f8bb2d753aeb18.tar.xz |
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
tty: serial: altera_jtaguart: Add device tree support
tty: serial: altera_uart: Add devicetree support
dt: eliminate of_platform_driver shim code
dt: Eliminate of_platform_{,un}register_driver
dt/serial: Eliminate users of of_platform_{,un}register_driver
dt/usb: Eliminate users of of_platform_{,un}register_driver
dt/video: Eliminate users of of_platform_{,un}register_driver
dt/net: Eliminate users of of_platform_{,un}register_driver
dt/sound: Eliminate users of of_platform_{,un}register_driver
dt/spi: Eliminate users of of_platform_{,un}register_driver
dt: uartlite: merge platform and of_platform driver bindings
dt: xilinx_hwicap: merge platform and of_platform driver bindings
ipmi: convert OF driver to platform driver
leds/leds-gpio: merge platform_driver with of_platform_driver
dt/sparc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: move of_bus_type infrastructure to ibmebus
drivercore/dt: add a match table pointer to struct device
dt: Typo fix.
altera_ps2: Add devicetree support
...
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/maps/physmap_of.c | 15 | ||||
-rw-r--r-- | drivers/mtd/maps/sun_uflash.c | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/fsl_upm.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/mpc5121_nfc.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/ndfc.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/pasemi_nand.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/socrates_nand.c | 9 |
7 files changed, 33 insertions, 35 deletions
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 8506578e6a35..3db0cb083d31 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c @@ -216,8 +216,7 @@ static void __devinit of_free_probes(const char **probes) } #endif -static int __devinit of_flash_probe(struct platform_device *dev, - const struct of_device_id *match) +static int __devinit of_flash_probe(struct platform_device *dev) { #ifdef CONFIG_MTD_PARTITIONS const char **part_probe_types; @@ -225,7 +224,7 @@ static int __devinit of_flash_probe(struct platform_device *dev, struct device_node *dp = dev->dev.of_node; struct resource res; struct of_flash *info; - const char *probe_type = match->data; + const char *probe_type; const __be32 *width; int err; int i; @@ -235,6 +234,10 @@ static int __devinit of_flash_probe(struct platform_device *dev, struct mtd_info **mtd_list = NULL; resource_size_t res_size; + if (!dev->dev.of_match) + return -EINVAL; + probe_type = dev->dev.of_match->data; + reg_tuple_size = (of_n_addr_cells(dp) + of_n_size_cells(dp)) * sizeof(u32); /* @@ -418,7 +421,7 @@ static struct of_device_id of_flash_match[] = { }; MODULE_DEVICE_TABLE(of, of_flash_match); -static struct of_platform_driver of_flash_driver = { +static struct platform_driver of_flash_driver = { .driver = { .name = "of-flash", .owner = THIS_MODULE, @@ -430,12 +433,12 @@ static struct of_platform_driver of_flash_driver = { static int __init of_flash_init(void) { - return of_register_platform_driver(&of_flash_driver); + return platform_driver_register(&of_flash_driver); } static void __exit of_flash_exit(void) { - of_unregister_platform_driver(&of_flash_driver); + platform_driver_unregister(&of_flash_driver); } module_init(of_flash_init); diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index 3582ba1f9b09..3f1cb328a574 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c @@ -108,7 +108,7 @@ int uflash_devinit(struct platform_device *op, struct device_node *dp) return 0; } -static int __devinit uflash_probe(struct platform_device *op, const struct of_device_id *match) +static int __devinit uflash_probe(struct platform_device *op) { struct device_node *dp = op->dev.of_node; @@ -148,7 +148,7 @@ static const struct of_device_id uflash_match[] = { MODULE_DEVICE_TABLE(of, uflash_match); -static struct of_platform_driver uflash_driver = { +static struct platform_driver uflash_driver = { .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, @@ -160,12 +160,12 @@ static struct of_platform_driver uflash_driver = { static int __init uflash_init(void) { - return of_register_platform_driver(&uflash_driver); + return platform_driver_register(&uflash_driver); } static void __exit uflash_exit(void) { - of_unregister_platform_driver(&uflash_driver); + platform_driver_unregister(&uflash_driver); } module_init(uflash_init); diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index efdcca94ce55..073ee026a17c 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c @@ -217,8 +217,7 @@ err: return ret; } -static int __devinit fun_probe(struct platform_device *ofdev, - const struct of_device_id *ofid) +static int __devinit fun_probe(struct platform_device *ofdev) { struct fsl_upm_nand *fun; struct resource io_res; @@ -360,7 +359,7 @@ static const struct of_device_id of_fun_match[] = { }; MODULE_DEVICE_TABLE(of, of_fun_match); -static struct of_platform_driver of_fun_driver = { +static struct platform_driver of_fun_driver = { .driver = { .name = "fsl,upm-nand", .owner = THIS_MODULE, @@ -372,13 +371,13 @@ static struct of_platform_driver of_fun_driver = { static int __init fun_module_init(void) { - return of_register_platform_driver(&of_fun_driver); + return platform_driver_register(&of_fun_driver); } module_init(fun_module_init); static void __exit fun_module_exit(void) { - of_unregister_platform_driver(&of_fun_driver); + platform_driver_unregister(&of_fun_driver); } module_exit(fun_module_exit); diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 469e649c911c..c2f95437e5e9 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c @@ -650,8 +650,7 @@ static void mpc5121_nfc_free(struct device *dev, struct mtd_info *mtd) iounmap(prv->csreg); } -static int __devinit mpc5121_nfc_probe(struct platform_device *op, - const struct of_device_id *match) +static int __devinit mpc5121_nfc_probe(struct platform_device *op) { struct device_node *rootnode, *dn = op->dev.of_node; struct device *dev = &op->dev; @@ -891,7 +890,7 @@ static struct of_device_id mpc5121_nfc_match[] __devinitdata = { {}, }; -static struct of_platform_driver mpc5121_nfc_driver = { +static struct platform_driver mpc5121_nfc_driver = { .probe = mpc5121_nfc_probe, .remove = __devexit_p(mpc5121_nfc_remove), .driver = { @@ -903,14 +902,14 @@ static struct of_platform_driver mpc5121_nfc_driver = { static int __init mpc5121_nfc_init(void) { - return of_register_platform_driver(&mpc5121_nfc_driver); + return platform_driver_register(&mpc5121_nfc_driver); } module_init(mpc5121_nfc_init); static void __exit mpc5121_nfc_cleanup(void) { - of_unregister_platform_driver(&mpc5121_nfc_driver); + platform_driver_unregister(&mpc5121_nfc_driver); } module_exit(mpc5121_nfc_cleanup); diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index c9ae0a5023b6..bbe6d451290d 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -225,8 +225,7 @@ err: return ret; } -static int __devinit ndfc_probe(struct platform_device *ofdev, - const struct of_device_id *match) +static int __devinit ndfc_probe(struct platform_device *ofdev) { struct ndfc_controller *ndfc = &ndfc_ctrl; const __be32 *reg; @@ -292,7 +291,7 @@ static const struct of_device_id ndfc_match[] = { }; MODULE_DEVICE_TABLE(of, ndfc_match); -static struct of_platform_driver ndfc_driver = { +static struct platform_driver ndfc_driver = { .driver = { .name = "ndfc", .owner = THIS_MODULE, @@ -304,12 +303,12 @@ static struct of_platform_driver ndfc_driver = { static int __init ndfc_nand_init(void) { - return of_register_platform_driver(&ndfc_driver); + return platform_driver_register(&ndfc_driver); } static void __exit ndfc_nand_exit(void) { - of_unregister_platform_driver(&ndfc_driver); + platform_driver_unregister(&ndfc_driver); } module_init(ndfc_nand_init); diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index bb277a54986f..59efa829ef24 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c @@ -89,8 +89,7 @@ int pasemi_device_ready(struct mtd_info *mtd) return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR); } -static int __devinit pasemi_nand_probe(struct platform_device *ofdev, - const struct of_device_id *match) +static int __devinit pasemi_nand_probe(struct platform_device *ofdev) { struct pci_dev *pdev; struct device_node *np = ofdev->dev.of_node; @@ -219,7 +218,7 @@ static const struct of_device_id pasemi_nand_match[] = MODULE_DEVICE_TABLE(of, pasemi_nand_match); -static struct of_platform_driver pasemi_nand_driver = +static struct platform_driver pasemi_nand_driver = { .driver = { .name = (char*)driver_name, @@ -232,13 +231,13 @@ static struct of_platform_driver pasemi_nand_driver = static int __init pasemi_nand_init(void) { - return of_register_platform_driver(&pasemi_nand_driver); + return platform_driver_register(&pasemi_nand_driver); } module_init(pasemi_nand_init); static void __exit pasemi_nand_exit(void) { - of_unregister_platform_driver(&pasemi_nand_driver); + platform_driver_unregister(&pasemi_nand_driver); } module_exit(pasemi_nand_exit); diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c index a8e403eebedb..a853548986f0 100644 --- a/drivers/mtd/nand/socrates_nand.c +++ b/drivers/mtd/nand/socrates_nand.c @@ -162,8 +162,7 @@ static const char *part_probes[] = { "cmdlinepart", NULL }; /* * Probe for the NAND device. */ -static int __devinit socrates_nand_probe(struct platform_device *ofdev, - const struct of_device_id *ofid) +static int __devinit socrates_nand_probe(struct platform_device *ofdev) { struct socrates_nand_host *host; struct mtd_info *mtd; @@ -300,7 +299,7 @@ static const struct of_device_id socrates_nand_match[] = MODULE_DEVICE_TABLE(of, socrates_nand_match); -static struct of_platform_driver socrates_nand_driver = { +static struct platform_driver socrates_nand_driver = { .driver = { .name = "socrates_nand", .owner = THIS_MODULE, @@ -312,12 +311,12 @@ static struct of_platform_driver socrates_nand_driver = { static int __init socrates_nand_init(void) { - return of_register_platform_driver(&socrates_nand_driver); + return platform_driver_register(&socrates_nand_driver); } static void __exit socrates_nand_exit(void) { - of_unregister_platform_driver(&socrates_nand_driver); + platform_driver_unregister(&socrates_nand_driver); } module_init(socrates_nand_init); |