/* Returns: 0: transport successfully loaded -ENOENT: transport module not available  */
int xprt_load_transport(const char *transport_name)
/* Returns: 0: transport successfully loaded -ENOENT: transport module not available  */
int xprt_load_transport(const char *transport_name)
{
	struct xprt_class *t;
	char module_name[sizeof t->name + 5];
	int result;
	result = 0;
	spin_lock(&xprt_list_lock);
	list_for_each_entry(t, &xprt_list, list) {
		if (strcmp(t->name, transport_name) == 0) {
			spin_unlock(&xprt_list_lock);
			goto out;
		}
	}
	spin_unlock(&xprt_list_lock);
	strcpy(module_name, "xprt");
	strncat(module_name, transport_name, sizeof t->name);
	result = request_module(module_name);
out:
	return result;
}