Commit 51b5d8d7 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman
Browse files

greybus: interface: name routines consistently



Routines should be named this way: gb_<object>_<operation>. Fix all
routines that don't match this.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 5ddf738e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ static void svc_hotplug(struct svc_function_hotplug *hotplug,
			return;
		}
		dev_dbg(hd->parent, "interface id %d added\n", interface_id);
		gb_add_interface(hd, interface_id, hotplug->data,
		gb_interface_add(hd, interface_id, hotplug->data,
				 payload_length - 0x02);
		break;

@@ -189,7 +189,7 @@ static void svc_hotplug(struct svc_function_hotplug *hotplug,
			return;
		}
		dev_dbg(hd->parent, "interface id %d removed\n", interface_id);
		gb_remove_interface(hd, interface_id);
		gb_interface_remove(hd, interface_id);
		break;

	default:
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ void greybus_remove_hd(struct greybus_host_device *hd)
	 * with this host controller before freeing the memory associated with
	 * the host controller.
	 */
	gb_remove_interfaces(hd);
	gb_interfaces_remove(hd);
	gb_endo_remove(hd->endo);
	kref_put_mutex(&hd->kref, free_hd, &hd_mutex);
}
+6 −6
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ struct gb_interface *gb_interface_find(struct greybus_host_device *hd,
	return NULL;
}

static void greybus_interface_release(struct device *dev)
static void gb_interface_release(struct device *dev)
{
	struct gb_interface *intf = to_gb_interface(dev);

@@ -63,7 +63,7 @@ static void greybus_interface_release(struct device *dev)

struct device_type greybus_interface_type = {
	.name =		"greybus_interface",
	.release =	greybus_interface_release,
	.release =	gb_interface_release,
};

/*
@@ -161,12 +161,12 @@ static void gb_interface_destroy(struct gb_interface *intf)
}

/**
 * gb_add_interface
 * gb_interface_add
 *
 * Pass in a buffer that _should_ contain a Greybus manifest
 * and register a greybus device structure with the kernel core.
 */
void gb_add_interface(struct greybus_host_device *hd, u8 interface_id, u8 *data,
void gb_interface_add(struct greybus_host_device *hd, u8 interface_id, u8 *data,
		      int size)
{
	struct gb_interface *intf;
@@ -201,7 +201,7 @@ void gb_add_interface(struct greybus_host_device *hd, u8 interface_id, u8 *data,
	gb_interface_destroy(intf);
}

void gb_remove_interface(struct greybus_host_device *hd, u8 interface_id)
void gb_interface_remove(struct greybus_host_device *hd, u8 interface_id)
{
	struct gb_interface *intf = gb_interface_find(hd, interface_id);

@@ -212,7 +212,7 @@ void gb_remove_interface(struct greybus_host_device *hd, u8 interface_id)
			interface_id);
}

void gb_remove_interfaces(struct greybus_host_device *hd)
void gb_interfaces_remove(struct greybus_host_device *hd)
{
	struct gb_interface *intf, *temp;

+3 −3
Original line number Diff line number Diff line
@@ -47,10 +47,10 @@ static inline void *gb_interface_get_drvdata(struct gb_interface *intf)
struct gb_interface *gb_interface_find(struct greybus_host_device *hd,
				       u8 interface_id);

void gb_add_interface(struct greybus_host_device *hd, u8 interface_id, u8 *data,
void gb_interface_add(struct greybus_host_device *hd, u8 interface_id, u8 *data,
		      int size);
void gb_remove_interface(struct greybus_host_device *hd, u8 interface_id);
void gb_remove_interfaces(struct greybus_host_device *hd);
void gb_interface_remove(struct greybus_host_device *hd, u8 interface_id);
void gb_interfaces_remove(struct greybus_host_device *hd);


#endif /* __INTERFACE_H */