From: Greg Kroah-Hartman Date: Wed, 12 Aug 2015 02:39:27 +0000 (-0700) Subject: greybus: Merge branch 'master' into branch 'svc'. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=542f27a18f574d3807735bdcdbde8f8423c2f817;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: Merge branch 'master' into branch 'svc'. This required some hand-tweaking in connection.c, hopefully I got it all correct... Signed-off-by: Greg Kroah-Hartman --- 542f27a18f574d3807735bdcdbde8f8423c2f817 diff --cc drivers/staging/greybus/connection.c index 1a657f706b93,88383b6e603f..ef837c50fcfb --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@@ -335,6 -330,27 +335,28 @@@ void gb_connection_destroy(struct gb_co device_unregister(&connection->dev); } + static void gb_connection_disconnected(struct gb_connection *connection) + { + struct gb_control *control; + int cport_id = connection->intf_cport_id; + int ret; + + /* + * Inform Interface about In-active CPorts. We don't need to do this + * operation for control cport. + */ - if (cport_id == GB_CONTROL_CPORT_ID) ++ if ((cport_id == GB_CONTROL_CPORT_ID) || ++ (connection->hd_cport_id == GB_SVC_CPORT_ID)) + return; + + control = connection->bundle->intf->control; + + ret = gb_control_disconnected_operation(control, cport_id); + if (ret) + dev_warn(&connection->dev, + "Failed to disconnect CPort-%d (%d)\n", cport_id, ret); + } + int gb_connection_init(struct gb_connection *connection) { int cport_id = connection->intf_cport_id; diff --cc drivers/staging/greybus/svc.c index 4bf55e0e4f34,025b2bad9428..16a37f22135c --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@@ -16,16 -11,8 +16,14 @@@ struct gb_svc { struct gb_connection *connection; - u8 version_major; - u8 version_minor; }; +struct svc_hotplug { + struct work_struct work; + struct gb_connection *connection; + struct gb_svc_intf_hotplug_request data; +}; + static struct ida greybus_svc_device_id_map; /*