retval = bus_register(&greybus_bus_type);
if (retval) {
- pr_err("bus_register failed\n");
+ pr_err("bus_register failed (%d)\n", retval);
goto error_bus;
}
retval = gb_ap_init();
if (retval) {
- pr_err("gb_ap_init failed\n");
+ pr_err("gb_ap_init failed (%d)\n", retval);
goto error_ap;
}
retval = gb_operation_init();
if (retval) {
- pr_err("gb_operation_init failed\n");
+ pr_err("gb_operation_init failed (%d)\n", retval);
goto error_operation;
}
+ retval = gb_endo_init();
+ if (retval) {
+ pr_err("gb_endo_init failed (%d)\n", retval);
+ goto error_endo;
+ }
+
return 0; /* Success */
+error_endo:
+ gb_operation_exit();
error_operation:
gb_ap_exit();
error_ap:
static void __exit gb_exit(void)
{
+ gb_endo_exit();
gb_operation_exit();
gb_ap_exit();
bus_unregister(&greybus_bus_type);
gb_debugfs_cleanup();
}
module_exit(gb_exit);
-
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Greg Kroah-Hartman <gregkh@linuxfoundation.org>");
device_unregister(&endo->dev);
}
+int __init gb_endo_init(void)
+{
+ return 0;
+}
+
+void __exit gb_endo_exit(void)
+{
+}
/* Greybus "private" definitions */
struct greybus_host_device;
+int gb_endo_init(void) __init;
+void gb_endo_exit(void) __exit;
+
struct gb_endo *gb_endo_create(struct greybus_host_device *hd,
u16 endo_id, u8 ap_intf_id);
void gb_endo_remove(struct gb_endo *endo);
return -ENOMEM;
}
-void __exit gb_operation_exit(void)
+void gb_operation_exit(void)
{
destroy_workqueue(gb_operation_workqueue);
gb_operation_workqueue = NULL;
void *response, int response_size);
int gb_operation_init(void) __init;
-void gb_operation_exit(void) __exit;
+void gb_operation_exit(void);
#endif /* !__OPERATION_H */