greybus: Merge branch 'master' into branch 'svc'.
authorGreg Kroah-Hartman <gregkh@google.com>
Wed, 12 Aug 2015 02:39:27 +0000 (19:39 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 12 Aug 2015 02:40:01 +0000 (19:40 -0700)
This required some hand-tweaking in connection.c, hopefully I got it all
correct...

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
1  2 
drivers/staging/greybus/connection.c
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/svc.c

index 1a657f706b93124303151ac521d057e1a6e9cb14,88383b6e603f5183b3df680cffcb92134be80f56..ef837c50fcfbfbc9e72e0f371f18b9055c16eb3c
@@@ -335,6 -330,27 +335,28 @@@ void gb_connection_destroy(struct gb_co
        device_unregister(&connection->dev);
  }
  
 -      if (cport_id == GB_CONTROL_CPORT_ID)
+ 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) ||
++          (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;
index 4bf55e0e4f3440ade912da86e6ad9806d8116574,025b2bad94280b2687b9bc6a494142afe77da1c8..16a37f22135c8dae659b88a041f7617f6a7c9da8
  
  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;
  
  /*