1. 31 10月, 2012 3 次提交
    • S
      usb: gadget: let f_* use usb_string_ids_tab() where it makes sense · 1616e99d
      Sebastian Andrzej Siewior 提交于
      Instead of calling usb_string_id() multiple times I replace it with one
      usb_string_ids_tab(). The NULL pointer in struct usb_string with "" and
      are not overwritten in fail or unbind case.
      
      The conditional assignment remains because some gadgets recycle the string
      ID because the same descriptor (and string ID) is used if we have more
      than one config descriptor.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      1616e99d
    • S
      usb: gadget: always update HS/SS descriptors and create a copy of them · 10287bae
      Sebastian Andrzej Siewior 提交于
      HS and SS descriptors are staticaly created. They are updated during the
      bind process with the endpoint address, string id or interface numbers.
      
      After that, the descriptor chain is linked to struct usb_function which
      is used by composite in order to serve the GET_DESCRIPTOR requests,
      number of available configs and so on.
      
      There is no need to assign the HS descriptor only if the UDC supports
      HS speed because composite won't report those to the host if HS support
      has not been reached. The same reasoning is valid for SS.
      
      This patch makes sure each function updates HS/SS descriptors
      unconditionally and uses the newly introduced helper function to create a
      copy the descriptors for the speed which is supported by the UDC.
      
      While at that, also rename f->descriptors to f->fs_descriptors in order
      to make it more explicit what that means.
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      10287bae
    • S
      usb: gadget: uvc: fix error path in uvc_function_bind() · 0f9df939
      Sebastian Andrzej Siewior 提交于
      The "video->minor = -1" assigment is done in V4L2 by
      video_register_device() so it is removed here.
      Now. uvc_function_bind() calls in error case uvc_function_unbind() for
      cleanup. The problem is that uvc_function_unbind() frees the uvc struct
      and uvc_bind_config() does as well in error case of usb_add_function().
      Removing kfree() in usb_add_function() would make the patch smaller but
      it would look odd because the new allocated memory is not cleaned up.
      However it is not guaranteed that if we call usb_add_function() we also
      get to the bind function.
      Therefore the patch extracts the conditional cleanup from
      uvc_function_unbind() applies to uvc_function_bind().
      uvc_function_unbind() now contains only the complete cleanup which is
      required once everything has been registrated.
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Bhupesh Sharma <bhupesh.sharma@st.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      0f9df939
  2. 04 6月, 2012 3 次提交
  3. 10 9月, 2011 1 次提交
    • K
      usb gadget: clean up FSF boilerplate text · 28c9fc68
      Klaus Schwarzkopf 提交于
      remove the following two paragraphs as they are not needed:
      
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
      License for more details.
      
      You should have received a copy of the GNU General Public License along with
      this program; if not, write to the Free Software Foundation, Inc.,59
      Temple Place - Suite 330, Boston, MA  02111-1307, USA.
      Signed-off-by: NKlaus Schwarzkopf <schwarzkopf@sensortherm.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      28c9fc68
  4. 02 7月, 2011 1 次提交
  5. 29 6月, 2011 1 次提交
  6. 03 8月, 2010 1 次提交
  7. 12 7月, 2010 1 次提交
  8. 21 5月, 2010 1 次提交