1. 12 Jun, 2015 3 commits
    • Alex Elder's avatar
      greybus: connection: un-abstract host cport id allocation · f9b0366f
      Alex Elder authored
      I did this recently for the endo id allocation code.
      
      It's clearer now that the allocation of a CPort ID to use for
      the AP side of a connection is not very complicated, and it
      happens in a pretty controlled environment.  The functions that
      abstract getting and releasing those ids don't really add that
      much value.
      
      This patch removes gb_connection_hd_cport_id_alloc() and
      gb_connection_hd_cport_id_free(), and just open-codes their
      activity in the few places they are called.
      
      It is obvious now that the CPort ID allocation isn't done in
      atomic context, so we can change the ida_simple_get() call to
      use GFP_KERNEL.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      f9b0366f
    • Alex Elder's avatar
      greybus: connection: drop unneeded gb_protocol_put() calls · deb58ca8
      Alex Elder authored
      Although a connection records its protocol id when it gets
      created, its protocol handler doesn't actually get assigned
      until gb_connection_bind_protocol() is called.
      
      In gb_connection_create() there are some error paths in
      which a reference to the connection's protocol is released
      before the protocol handler has been associated with the
      connection.
      
      Get rid of those calls.
      
      As a result, we will never pass a null protocol pointer to
      gb_protocol_put().  Add a precautionary warning in that
      function in the event that ever occurs.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      deb58ca8
    • Alex Elder's avatar
      greybus: connection: remove extra kfree() call · 856618f3
      Alex Elder authored
      When an error occurs in the device_add() call for a connection, the
      device reference is dropped as required.  Because that's the device's
      only reference, that will also lead to gb_connection_release() being
      called, which frees the connection structure.
      
      Right now we're then making an extra request to free the connection,
      which is wrong.  Fix that.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      856618f3
  2. 11 Jun, 2015 3 commits
  3. 10 Jun, 2015 12 commits
  4. 09 Jun, 2015 3 commits
  5. 08 Jun, 2015 7 commits
  6. 04 Jun, 2015 12 commits