mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
dt: Eliminate of_platform_{,un}register_driver
Final step to eliminate of_platform_bus_type. They're all just platform drivers now. v2: fix type in pasemi_nand.c (thanks to Stephen Rothwell) Signed-off-by: Grant Likely <[email protected]>
This commit is contained in:
parent
793218dfea
commit
1c48a5c93d
27 changed files with 134 additions and 148 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue