greybus: arche-ctrl: Don't expose driver internals to arche-platform driver

We have chosen the *ugly* way of registering two platform drivers from
the module_init() of only one of them, so that we can avoid having two
separate modules for them.

But we should still be doing this in a sane way. There is no need to
expose internals of arche-ctrl to arche-platform, like PM-ops, probe,
resume, id-table, etc. Just expose an init and a exit callback.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index 3ff4f69..d1083cf 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -580,11 +580,6 @@
 	{ },
 };
 
-static struct of_device_id arche_apb_ctrl_of_match[] = {
-	{ .compatible = "usbffff,2", },
-	{ },
-};
-
 static struct of_device_id arche_combined_id[] = {
 	{ .compatible = "google,arche-platform", }, /* Use PID/VID of SVC device */
 	{ .compatible = "usbffff,2", },
@@ -602,16 +597,6 @@
 	}
 };
 
-static struct platform_driver arche_apb_ctrl_device_driver = {
-	.probe		= arche_apb_ctrl_probe,
-	.remove		= arche_apb_ctrl_remove,
-	.driver		= {
-		.name	= "arche-apb-ctrl",
-		.pm	= &arche_apb_ctrl_pm_ops,
-		.of_match_table = arche_apb_ctrl_of_match,
-	}
-};
-
 static int __init arche_init(void)
 {
 	int retval;
@@ -620,7 +605,7 @@
 	if (retval)
 		return retval;
 
-	retval = platform_driver_register(&arche_apb_ctrl_device_driver);
+	retval = arche_apb_init();
 	if (retval)
 		platform_driver_unregister(&arche_platform_device_driver);
 
@@ -630,7 +615,7 @@
 
 static void __exit arche_exit(void)
 {
-	platform_driver_unregister(&arche_apb_ctrl_device_driver);
+	arche_apb_exit();
 	platform_driver_unregister(&arche_platform_device_driver);
 }
 module_exit(arche_exit);