dt/sparc: Eliminate users of of_platform_{,un}register_driver

Get rid of old users of of_platform_driver in arch/sparc.  Most
of_platform_driver users can be converted to use the platform_bus
directly.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cette révision appartient à :
Grant Likely
2011-02-22 20:01:33 -07:00
Parent 000061245a
révision 4ebb24f707
27 fichiers modifiés avec 133 ajouts et 148 suppressions

Voir le fichier

@@ -361,8 +361,7 @@ fail:
extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
static int __devinit bbc_i2c_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit bbc_i2c_probe(struct platform_device *op)
{
struct bbc_i2c_bus *bp;
int err, index = 0;
@@ -413,7 +412,7 @@ static const struct of_device_id bbc_i2c_match[] = {
};
MODULE_DEVICE_TABLE(of, bbc_i2c_match);
static struct of_platform_driver bbc_i2c_driver = {
static struct platform_driver bbc_i2c_driver = {
.driver = {
.name = "bbc_i2c",
.owner = THIS_MODULE,
@@ -425,12 +424,12 @@ static struct of_platform_driver bbc_i2c_driver = {
static int __init bbc_i2c_init(void)
{
return of_register_platform_driver(&bbc_i2c_driver);
return platform_driver_register(&bbc_i2c_driver);
}
static void __exit bbc_i2c_exit(void)
{
of_unregister_platform_driver(&bbc_i2c_driver);
platform_driver_unregister(&bbc_i2c_driver);
}
module_init(bbc_i2c_init);

Voir le fichier

@@ -171,8 +171,7 @@ static struct miscdevice d7s_miscdev = {
.fops = &d7s_fops
};
static int __devinit d7s_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit d7s_probe(struct platform_device *op)
{
struct device_node *opts;
int err = -EINVAL;
@@ -266,7 +265,7 @@ static const struct of_device_id d7s_match[] = {
};
MODULE_DEVICE_TABLE(of, d7s_match);
static struct of_platform_driver d7s_driver = {
static struct platform_driver d7s_driver = {
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
@@ -278,12 +277,12 @@ static struct of_platform_driver d7s_driver = {
static int __init d7s_init(void)
{
return of_register_platform_driver(&d7s_driver);
return platform_driver_register(&d7s_driver);
}
static void __exit d7s_exit(void)
{
of_unregister_platform_driver(&d7s_driver);
platform_driver_unregister(&d7s_driver);
}
module_init(d7s_init);

Voir le fichier

@@ -1028,8 +1028,7 @@ static int kenvctrld(void *__unused)
return 0;
}
static int __devinit envctrl_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit envctrl_probe(struct platform_device *op)
{
struct device_node *dp;
int index, err;
@@ -1129,7 +1128,7 @@ static const struct of_device_id envctrl_match[] = {
};
MODULE_DEVICE_TABLE(of, envctrl_match);
static struct of_platform_driver envctrl_driver = {
static struct platform_driver envctrl_driver = {
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
@@ -1141,12 +1140,12 @@ static struct of_platform_driver envctrl_driver = {
static int __init envctrl_init(void)
{
return of_register_platform_driver(&envctrl_driver);
return platform_driver_register(&envctrl_driver);
}
static void __exit envctrl_exit(void)
{
of_unregister_platform_driver(&envctrl_driver);
platform_driver_unregister(&envctrl_driver);
}
module_init(envctrl_init);

Voir le fichier

@@ -160,8 +160,7 @@ static const struct file_operations flash_fops = {
static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
static int __devinit flash_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit flash_probe(struct platform_device *op)
{
struct device_node *dp = op->dev.of_node;
struct device_node *parent;
@@ -207,7 +206,7 @@ static const struct of_device_id flash_match[] = {
};
MODULE_DEVICE_TABLE(of, flash_match);
static struct of_platform_driver flash_driver = {
static struct platform_driver flash_driver = {
.driver = {
.name = "flash",
.owner = THIS_MODULE,
@@ -219,12 +218,12 @@ static struct of_platform_driver flash_driver = {
static int __init flash_init(void)
{
return of_register_platform_driver(&flash_driver);
return platform_driver_register(&flash_driver);
}
static void __exit flash_cleanup(void)
{
of_unregister_platform_driver(&flash_driver);
platform_driver_unregister(&flash_driver);
}
module_init(flash_init);

Voir le fichier

@@ -348,8 +348,7 @@ static void uctrl_get_external_status(struct uctrl_driver *driver)
}
static int __devinit uctrl_probe(struct platform_device *op,
const struct of_device_id *match)
static int __devinit uctrl_probe(struct platform_device *op)
{
struct uctrl_driver *p;
int err = -ENOMEM;
@@ -425,7 +424,7 @@ static const struct of_device_id uctrl_match[] = {
};
MODULE_DEVICE_TABLE(of, uctrl_match);
static struct of_platform_driver uctrl_driver = {
static struct platform_driver uctrl_driver = {
.driver = {
.name = "uctrl",
.owner = THIS_MODULE,
@@ -438,12 +437,12 @@ static struct of_platform_driver uctrl_driver = {
static int __init uctrl_init(void)
{
return of_register_platform_driver(&uctrl_driver);
return platform_driver_register(&uctrl_driver);
}
static void __exit uctrl_exit(void)
{
of_unregister_platform_driver(&uctrl_driver);
platform_driver_unregister(&uctrl_driver);
}
module_init(uctrl_init);