From: Johan Hovold Date: Thu, 21 Jan 2016 16:34:15 +0000 (+0100) Subject: greybus: connection: rename connection-create interface X-Git-Tag: v4.14-rc1~2366^2~378^2~21^2~772 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96c2af5c6bf7dda9498fdcea57fde1bdc677236a;p=platform%2Fkernel%2Flinux-rpi.git greybus: connection: rename connection-create interface Drop the _dynamic suffix from the exported interface that drivers use to create connections. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 227bfe8..5d0edbe 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -112,7 +112,7 @@ static void gb_connection_init_name(struct gb_connection *connection) } /* - * gb_connection_create() - create a Greybus connection + * _gb_connection_create() - create a Greybus connection * @hd: host device of the connection * @hd_cport_id: host-device cport id, or -1 for dynamic allocation * @intf: remote interface, or NULL for static connections @@ -132,7 +132,7 @@ static void gb_connection_init_name(struct gb_connection *connection) * Return: A pointer to the new connection if successful, or NULL otherwise. */ static struct gb_connection * -gb_connection_create(struct gb_host_device *hd, int hd_cport_id, +_gb_connection_create(struct gb_host_device *hd, int hd_cport_id, struct gb_interface *intf, struct gb_bundle *bundle, int cport_id) { @@ -215,23 +215,23 @@ err_unlock: struct gb_connection * gb_connection_create_static(struct gb_host_device *hd, u16 hd_cport_id) { - return gb_connection_create(hd, hd_cport_id, NULL, NULL, 0); + return _gb_connection_create(hd, hd_cport_id, NULL, NULL, 0); } struct gb_connection * gb_connection_create_control(struct gb_interface *intf) { - return gb_connection_create(intf->hd, -1, intf, NULL, 0); + return _gb_connection_create(intf->hd, -1, intf, NULL, 0); } struct gb_connection * -gb_connection_create_dynamic(struct gb_bundle *bundle, u16 cport_id) +gb_connection_create(struct gb_bundle *bundle, u16 cport_id) { struct gb_interface *intf = bundle->intf; - return gb_connection_create(intf->hd, -1, intf, bundle, cport_id); + return _gb_connection_create(intf->hd, -1, intf, bundle, cport_id); } -EXPORT_SYMBOL_GPL(gb_connection_create_dynamic); +EXPORT_SYMBOL_GPL(gb_connection_create); static int gb_connection_hd_cport_enable(struct gb_connection *connection) { diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h index 863109c..0e78f10 100644 --- a/drivers/staging/greybus/connection.h +++ b/drivers/staging/greybus/connection.h @@ -58,7 +58,7 @@ struct gb_connection { struct gb_connection *gb_connection_create_static(struct gb_host_device *hd, u16 hd_cport_id); struct gb_connection *gb_connection_create_control(struct gb_interface *intf); -struct gb_connection *gb_connection_create_dynamic(struct gb_bundle *bundle, +struct gb_connection *gb_connection_create(struct gb_bundle *bundle, u16 cport_id); void gb_connection_destroy(struct gb_connection *connection); diff --git a/drivers/staging/greybus/legacy.c b/drivers/staging/greybus/legacy.c index 86ab7b7..fb0a82e 100644 --- a/drivers/staging/greybus/legacy.c +++ b/drivers/staging/greybus/legacy.c @@ -153,7 +153,7 @@ static int legacy_probe(struct gb_bundle *bundle, for (i = 0; i < data->num_cports; ++i) { cport_desc = &bundle->cport_desc[i]; - connection = gb_connection_create_dynamic(bundle, + connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id)); if (!connection) goto err_connections_destroy;