dt/net: Eliminate users of of_platform_{,un}register_driver
Get rid of users of of_platform_driver in drivers/net. The of_platform_{,un}register_driver functions are going away, so the users need to be converted to using the platform_bus_type directly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
@@ -10062,8 +10062,7 @@ static const struct niu_ops niu_phys_ops = {
|
||||
.unmap_single = niu_phys_unmap_single,
|
||||
};
|
||||
|
||||
static int __devinit niu_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
static int __devinit niu_of_probe(struct platform_device *op)
|
||||
{
|
||||
union niu_parent_id parent_id;
|
||||
struct net_device *dev;
|
||||
@@ -10223,7 +10222,7 @@ static const struct of_device_id niu_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, niu_match);
|
||||
|
||||
static struct of_platform_driver niu_of_driver = {
|
||||
static struct platform_driver niu_of_driver = {
|
||||
.driver = {
|
||||
.name = "niu",
|
||||
.owner = THIS_MODULE,
|
||||
@@ -10244,14 +10243,14 @@ static int __init niu_init(void)
|
||||
niu_debug = netif_msg_init(debug, NIU_MSG_DEFAULT);
|
||||
|
||||
#ifdef CONFIG_SPARC64
|
||||
err = of_register_platform_driver(&niu_of_driver);
|
||||
err = platform_driver_register(&niu_of_driver);
|
||||
#endif
|
||||
|
||||
if (!err) {
|
||||
err = pci_register_driver(&niu_pci_driver);
|
||||
#ifdef CONFIG_SPARC64
|
||||
if (err)
|
||||
of_unregister_platform_driver(&niu_of_driver);
|
||||
platform_driver_unregister(&niu_of_driver);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -10262,7 +10261,7 @@ static void __exit niu_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&niu_pci_driver);
|
||||
#ifdef CONFIG_SPARC64
|
||||
of_unregister_platform_driver(&niu_of_driver);
|
||||
platform_driver_unregister(&niu_of_driver);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user