Commit 3afe9521 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: hd: remove connection-create/destroy callbacks

These host-driver callbacks were intended to allow host drivers to
prepare a cport, something which can now be handled by the cport
enable/disable callbacks instead.

The current create/destroy are somewhat confusingly named as they were
not supposed to create or destroy connections. They were however called
from the unrelated helper functions that do create and destroy SVC
connections.

Furthermore, no errors were returned should the create callback fail,
which should have caused the connection initialisation to fail.

Remove these unused callbacks for now, and let us use the cport
enable/disable callbacks that should be able handle all host cport
initialisation (possibly after also adding an interface to provide
information for endpoint-cport mapping).
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent d7ea30a5
...@@ -374,9 +374,6 @@ gb_connection_svc_connection_create(struct gb_connection *connection) ...@@ -374,9 +374,6 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
return ret; return ret;
} }
if (hd->driver->connection_create)
hd->driver->connection_create(connection);
return 0; return 0;
} }
...@@ -386,9 +383,6 @@ gb_connection_svc_connection_destroy(struct gb_connection *connection) ...@@ -386,9 +383,6 @@ gb_connection_svc_connection_destroy(struct gb_connection *connection)
if (connection->protocol->flags & GB_PROTOCOL_SKIP_SVC_CONNECTION) if (connection->protocol->flags & GB_PROTOCOL_SKIP_SVC_CONNECTION)
return; return;
if (connection->hd->driver->connection_destroy)
connection->hd->driver->connection_destroy(connection);
gb_svc_connection_destroy(connection->hd->svc, gb_svc_connection_destroy(connection->hd->svc,
connection->hd->endo->ap_intf_id, connection->hd->endo->ap_intf_id,
connection->hd_cport_id, connection->hd_cport_id,
......
...@@ -77,8 +77,6 @@ struct greybus_host_driver { ...@@ -77,8 +77,6 @@ struct greybus_host_driver {
int (*cport_enable)(struct greybus_host_device *hd, u16 cport_id); int (*cport_enable)(struct greybus_host_device *hd, u16 cport_id);
int (*cport_disable)(struct greybus_host_device *hd, u16 cport_id); int (*cport_disable)(struct greybus_host_device *hd, u16 cport_id);
void (*connection_create)(struct gb_connection *connection);
void (*connection_destroy)(struct gb_connection *connection);
int (*message_send)(struct greybus_host_device *hd, u16 dest_cport_id, int (*message_send)(struct greybus_host_device *hd, u16 dest_cport_id,
struct gb_message *message, gfp_t gfp_mask); struct gb_message *message, gfp_t gfp_mask);
void (*message_cancel)(struct gb_message *message); void (*message_cancel)(struct gb_message *message);
......
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