return;
}
dev_dbg(hd->parent, "module id %d added\n", module_id);
- gb_add_module(hd, module_id, hotplug->data,
- payload_length - 0x02);
+ gb_add_interface(hd, module_id, hotplug->data,
+ payload_length - 0x02);
break;
case SVC_HOTUNPLUG_EVENT:
return;
}
dev_dbg(hd->parent, "module id %d removed\n", module_id);
- gb_remove_module(hd, module_id);
+ gb_remove_interface(hd, module_id);
break;
default:
{
/* Tear down all modules that happen to be associated with this host
* controller */
- gb_remove_modules(hd);
+ gb_remove_interfaces(hd);
kref_put_mutex(&hd->kref, free_hd, &hd_mutex);
}
EXPORT_SYMBOL_GPL(greybus_remove_hd);
int greybus_disabled(void);
-/* Internal functions to gb module, move to internal .h file eventually. */
-
-void gb_add_module(struct greybus_host_device *hd, u8 module_id,
- u8 *data, int size);
-void gb_remove_module(struct greybus_host_device *hd, u8 module_id);
-void gb_remove_modules(struct greybus_host_device *hd);
-
int greybus_svc_in(struct greybus_host_device *hd, u8 *data, int length);
int gb_ap_init(void);
void gb_ap_exit(void);
}
/**
- * gb_add_module
+ * gb_add_interface
*
* Pass in a buffer that _should_ contain a Greybus module manifest
* and register a greybus device structure with the kernel core.
*/
-void gb_add_module(struct greybus_host_device *hd, u8 module_id,
- u8 *data, int size)
+void gb_add_interface(struct greybus_host_device *hd, u8 module_id,
+ u8 *data, int size)
{
struct gb_interface *intf;
*/
if (!gb_manifest_parse(intf, data, size)) {
dev_err(hd->parent, "manifest error\n");
- goto err_module;
+ goto err_parse;
}
/*
return;
-err_module:
+err_parse:
gb_interface_destroy(intf);
}
-void gb_remove_module(struct greybus_host_device *hd, u8 module_id)
+void gb_remove_interface(struct greybus_host_device *hd, u8 module_id)
{
struct gb_interface *intf = gb_interface_find(hd, module_id);
dev_err(hd->parent, "interface id %d not found\n", module_id);
}
-void gb_remove_modules(struct greybus_host_device *hd)
+void gb_remove_interfaces(struct greybus_host_device *hd)
{
struct gb_interface *intf, *temp;
struct gb_interface *gb_interface_find(struct greybus_host_device *hd,
u8 module_id);
+void gb_add_interface(struct greybus_host_device *hd, u8 module_id,
+ u8 *data, int size);
+void gb_remove_interface(struct greybus_host_device *hd, u8 module_id);
+void gb_remove_interfaces(struct greybus_host_device *hd);
+
+
#endif /* __INTERFACE_H */