of/platform: remove all of_bus_type and of_platform_bus_type references

Both of_bus_type and of_platform_bus_type are just #define aliases
for the platform bus.  This patch removes all references to them and
switches to the of_register_platform_driver()/of_unregister_platform_driver()
API for registering.

Subsequent patches will convert each user of of_register_platform_driver()
into plain platform_drivers without the of_platform_driver shim.  At which
point the of_register_platform_driver()/of_unregister_platform_driver()
functions can be removed.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Grant Likely
2010-06-24 15:14:37 -06:00
parent eca3930163
commit 1ab1d63a85
59 changed files with 109 additions and 124 deletions

View File

@@ -425,12 +425,12 @@ static struct of_platform_driver bbc_i2c_driver = {
static int __init bbc_i2c_init(void)
{
return of_register_driver(&bbc_i2c_driver, &of_bus_type);
return of_register_platform_driver(&bbc_i2c_driver);
}
static void __exit bbc_i2c_exit(void)
{
of_unregister_driver(&bbc_i2c_driver);
of_unregister_platform_driver(&bbc_i2c_driver);
}
module_init(bbc_i2c_init);

View File

@@ -277,12 +277,12 @@ static struct of_platform_driver d7s_driver = {
static int __init d7s_init(void)
{
return of_register_driver(&d7s_driver, &of_bus_type);
return of_register_platform_driver(&d7s_driver);
}
static void __exit d7s_exit(void)
{
of_unregister_driver(&d7s_driver);
of_unregister_platform_driver(&d7s_driver);
}
module_init(d7s_init);

View File

@@ -1142,12 +1142,12 @@ static struct of_platform_driver envctrl_driver = {
static int __init envctrl_init(void)
{
return of_register_driver(&envctrl_driver, &of_bus_type);
return of_register_platform_driver(&envctrl_driver);
}
static void __exit envctrl_exit(void)
{
of_unregister_driver(&envctrl_driver);
of_unregister_platform_driver(&envctrl_driver);
}
module_init(envctrl_init);

View File

@@ -218,12 +218,12 @@ static struct of_platform_driver flash_driver = {
static int __init flash_init(void)
{
return of_register_driver(&flash_driver, &of_bus_type);
return of_register_platform_driver(&flash_driver);
}
static void __exit flash_cleanup(void)
{
of_unregister_driver(&flash_driver);
of_unregister_platform_driver(&flash_driver);
}
module_init(flash_init);

View File

@@ -437,12 +437,12 @@ static struct of_platform_driver uctrl_driver = {
static int __init uctrl_init(void)
{
return of_register_driver(&uctrl_driver, &of_bus_type);
return of_register_platform_driver(&uctrl_driver);
}
static void __exit uctrl_exit(void)
{
of_unregister_driver(&uctrl_driver);
of_unregister_platform_driver(&uctrl_driver);
}
module_init(uctrl_init);