Commit 1ab1d63a authored by Grant Likely's avatar Grant Likely
Browse files

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: default avatarGrant Likely <grant.likely@secretlab.ca>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eca39301
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -57,8 +57,7 @@ struct of_device *of_find_device_by_node(struct device_node *np)
{
	struct device *dev;

	dev = bus_find_device(&of_platform_bus_type,
			      NULL, np, of_dev_node_match);
	dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match);
	if (dev)
		return to_of_device(dev);
	return NULL;
+1 −2
Original line number Diff line number Diff line
@@ -61,8 +61,7 @@ struct of_device *of_find_device_by_node(struct device_node *np)
{
	struct device *dev;

	dev = bus_find_device(&of_platform_bus_type,
			      NULL, np, of_dev_node_match);
	dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match);
	if (dev)
		return to_of_device(dev);
	return NULL;
+0 −2
Original line number Diff line number Diff line
@@ -13,6 +13,4 @@
 *
 */

#define of_bus_type	of_platform_bus_type	/* for compatibility */

#endif
+1 −3
Original line number Diff line number Diff line
@@ -243,9 +243,7 @@ static struct of_platform_driver ecpp_driver = {

static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
{
	of_register_driver(&ecpp_driver, &of_bus_type);

	return 0;
	return of_register_platform_driver(&ecpp_driver);
}

#endif /* !(_ASM_SPARC64_PARPORT_H */
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ static struct of_platform_driver apc_driver = {

static int __init apc_init(void)
{
	return of_register_driver(&apc_driver, &of_bus_type);
	return of_register_platform_driver(&apc_driver);
}

/* This driver is not critical to the boot process
Loading