Commit 6d3d9504 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: connection: rename legacy init and exit functions

Rename legacy connection init and exit functions.

This is a step towards removing the legacy-protocol handling from core.
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 5dda7e5a
...@@ -435,7 +435,7 @@ void gb_connection_disable(struct gb_connection *connection) ...@@ -435,7 +435,7 @@ void gb_connection_disable(struct gb_connection *connection)
} }
EXPORT_SYMBOL_GPL(gb_connection_disable); EXPORT_SYMBOL_GPL(gb_connection_disable);
int gb_connection_init(struct gb_connection *connection) int gb_connection_legacy_init(struct gb_connection *connection)
{ {
int ret; int ret;
...@@ -464,9 +464,9 @@ int gb_connection_init(struct gb_connection *connection) ...@@ -464,9 +464,9 @@ int gb_connection_init(struct gb_connection *connection)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(gb_connection_init); EXPORT_SYMBOL_GPL(gb_connection_legacy_init);
void gb_connection_exit(struct gb_connection *connection) void gb_connection_legacy_exit(struct gb_connection *connection)
{ {
spin_lock_irq(&connection->lock); spin_lock_irq(&connection->lock);
if (connection->state != GB_CONNECTION_STATE_ENABLED) { if (connection->state != GB_CONNECTION_STATE_ENABLED) {
...@@ -483,7 +483,7 @@ void gb_connection_exit(struct gb_connection *connection) ...@@ -483,7 +483,7 @@ void gb_connection_exit(struct gb_connection *connection)
gb_connection_unbind_protocol(connection); gb_connection_unbind_protocol(connection);
} }
EXPORT_SYMBOL_GPL(gb_connection_exit); EXPORT_SYMBOL_GPL(gb_connection_legacy_exit);
/* /*
* Tear down a previously set up connection. * Tear down a previously set up connection.
...@@ -495,7 +495,7 @@ void gb_connection_destroy(struct gb_connection *connection) ...@@ -495,7 +495,7 @@ void gb_connection_destroy(struct gb_connection *connection)
if (WARN_ON(!connection)) if (WARN_ON(!connection))
return; return;
gb_connection_exit(connection); gb_connection_legacy_exit(connection);
spin_lock_irq(&gb_connections_lock); spin_lock_irq(&gb_connections_lock);
list_del(&connection->bundle_links); list_del(&connection->bundle_links);
......
...@@ -62,8 +62,11 @@ static inline bool gb_connection_is_static(struct gb_connection *connection) ...@@ -62,8 +62,11 @@ static inline bool gb_connection_is_static(struct gb_connection *connection)
return !connection->intf; return !connection->intf;
} }
int gb_connection_init(struct gb_connection *connection); int gb_connection_enable(struct gb_connection *connection);
void gb_connection_exit(struct gb_connection *connection); void gb_connection_disable(struct gb_connection *connection);
int gb_connection_legacy_init(struct gb_connection *connection);
void gb_connection_legacy_exit(struct gb_connection *connection);
void greybus_data_rcvd(struct gb_host_device *hd, u16 cport_id, void greybus_data_rcvd(struct gb_host_device *hd, u16 cport_id,
u8 *data, size_t length); u8 *data, size_t length);
......
...@@ -116,7 +116,7 @@ int gb_control_enable(struct gb_control *control) ...@@ -116,7 +116,7 @@ int gb_control_enable(struct gb_control *control)
dev_dbg(&control->connection->intf->dev, "%s\n", __func__); dev_dbg(&control->connection->intf->dev, "%s\n", __func__);
ret = gb_connection_init(control->connection); ret = gb_connection_legacy_init(control->connection);
if (ret) { if (ret) {
dev_err(&control->connection->intf->dev, dev_err(&control->connection->intf->dev,
"failed to enable control connection: %d\n", "failed to enable control connection: %d\n",
...@@ -131,7 +131,7 @@ void gb_control_disable(struct gb_control *control) ...@@ -131,7 +131,7 @@ void gb_control_disable(struct gb_control *control)
{ {
dev_dbg(&control->connection->intf->dev, "%s\n", __func__); dev_dbg(&control->connection->intf->dev, "%s\n", __func__);
gb_connection_exit(control->connection); gb_connection_legacy_exit(control->connection);
} }
void gb_control_destroy(struct gb_control *control) void gb_control_destroy(struct gb_control *control)
......
...@@ -23,7 +23,7 @@ static int legacy_probe(struct gb_bundle *bundle, ...@@ -23,7 +23,7 @@ static int legacy_probe(struct gb_bundle *bundle,
dev_dbg(&bundle->dev, "enabling connection %s\n", dev_dbg(&bundle->dev, "enabling connection %s\n",
connection->name); connection->name);
ret = gb_connection_init(connection); ret = gb_connection_legacy_init(connection);
if (ret) if (ret)
goto err_connections_disable; goto err_connections_disable;
} }
...@@ -33,7 +33,7 @@ static int legacy_probe(struct gb_bundle *bundle, ...@@ -33,7 +33,7 @@ static int legacy_probe(struct gb_bundle *bundle,
err_connections_disable: err_connections_disable:
list_for_each_entry_reverse(connection, &bundle->connections, list_for_each_entry_reverse(connection, &bundle->connections,
bundle_links) { bundle_links) {
gb_connection_exit(connection); gb_connection_legacy_exit(connection);
} }
return ret; return ret;
...@@ -48,7 +48,7 @@ static void legacy_disconnect(struct gb_bundle *bundle) ...@@ -48,7 +48,7 @@ static void legacy_disconnect(struct gb_bundle *bundle)
list_for_each_entry_reverse(connection, &bundle->connections, list_for_each_entry_reverse(connection, &bundle->connections,
bundle_links) { bundle_links) {
gb_connection_exit(connection); gb_connection_legacy_exit(connection);
} }
} }
......
...@@ -815,7 +815,7 @@ int gb_svc_add(struct gb_svc *svc) ...@@ -815,7 +815,7 @@ int gb_svc_add(struct gb_svc *svc)
* is added from the connection request handler when enough * is added from the connection request handler when enough
* information has been received. * information has been received.
*/ */
ret = gb_connection_init(svc->connection); ret = gb_connection_legacy_init(svc->connection);
if (ret) if (ret)
return ret; return ret;
...@@ -830,7 +830,7 @@ void gb_svc_del(struct gb_svc *svc) ...@@ -830,7 +830,7 @@ void gb_svc_del(struct gb_svc *svc)
if (device_is_registered(&svc->dev)) if (device_is_registered(&svc->dev))
device_del(&svc->dev); device_del(&svc->dev);
gb_connection_exit(svc->connection); gb_connection_legacy_exit(svc->connection);
flush_workqueue(svc->wq); flush_workqueue(svc->wq);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment