1. 25 3月, 2009 4 次提交
    • O
      USB: suspend/resume support for option driver · 4901b2c3
      Oliver Neukum 提交于
      This patch implements suspend and resume methods for the
      option driver. With my hardware I can even suspend the system
      and keep up a connection for a short time.
      Signed-off-by: NOliver Neukum <oneukum@suse.de>
      Signed-Off-By: NMatthias Urlichs <smurf@smurf.noris.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      4901b2c3
    • W
      USB: usb-serial ch341: support for DTR/RTS/CTS · 664d5df9
      Werner Cornelius 提交于
      Fixup of Werner Cornelius patch to the ch341 USB-serial driver, which adds:
      - support all baudrates, not just a hard-coded set
      - support for controlling DTR, RTS and CTS
      
      Features still missing:
      - character length other than 8 bits
      - parity settings
      - break control
      
      I adapted his patch for the new usb_serial API introduced in 2.6.25-git8 by
      Alan Cox on 22 July 2008. Non-compliance to the new API was a reason for
      refusing a similar patch from Tollef Fog Heen.
      
      Usage example by Tollef Fog Heen :
              TEMPer USB thermometer <http://err.no/src/TEMPer.c>
      Signed-off-by: NWerner Cornelius <Werner.Cornelius@cornelius-consult.de>
      Signed-off-by: NBoris Hajduk <boris@hajduk.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      664d5df9
    • J
      USB: drivers: use USB API functions rather than constants · 2e0fe709
      Julia Lawall 提交于
      This set of patches introduces calls to the following set of functions:
      
      usb_endpoint_dir_in(epd)
      usb_endpoint_dir_out(epd)
      usb_endpoint_is_bulk_in(epd)
      usb_endpoint_is_bulk_out(epd)
      usb_endpoint_is_int_in(epd)
      usb_endpoint_is_int_out(epd)
      usb_endpoint_num(epd)
      usb_endpoint_type(epd)
      usb_endpoint_xfer_bulk(epd)
      usb_endpoint_xfer_control(epd)
      usb_endpoint_xfer_int(epd)
      usb_endpoint_xfer_isoc(epd)
      
      In some cases, introducing one of these functions is not possible, and it
      just replaces an explicit integer value by one of the following constants:
      
      USB_ENDPOINT_XFER_BULK
      USB_ENDPOINT_XFER_CONTROL
      USB_ENDPOINT_XFER_INT
      USB_ENDPOINT_XFER_ISOC
      
      An extract of the semantic patch that makes these changes is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r1@ struct usb_endpoint_descriptor *epd; @@
      
      - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
      - \(USB_ENDPOINT_XFER_CONTROL\|0\))
      + usb_endpoint_xfer_control(epd)
      
      @r5@ struct usb_endpoint_descriptor *epd; @@
      
      - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
      -  \(USB_DIR_IN\|0x80\))
      + usb_endpoint_dir_in(epd)
      
      @inc@
      @@
      
      #include <linux/usb.h>
      
      @depends on !inc && (r1||r5)@
      @@
      
      + #include <linux/usb.h>
        #include <linux/usb/...>
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2e0fe709
    • J
      USB: Remove redundant test in pxa27x_udc and ftdi_sio · 00185a60
      Julia Lawall 提交于
      priv is checked not to be NULL near the beginning of the function and not
      changed subsequently, making the test redundant.
      
      A simplified version of the semantic patch that makes this change is as
      follows: (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      expression E;
      position p1,p2;
      @@
      
      if (x@p1 == NULL || ...) { ... when forall
         return ...; }
      ... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
      (
      x@p2 == NULL
      |
      x@p2 != NULL
      )
      
      // another path to the test that is not through p1?
      @s exists@
      local idexpression r.x;
      position r.p1,r.p2;
      @@
      
      ... when != x@p1
      (
      x@p2 == NULL
      |
      x@p2 != NULL
      )
      
      @fix depends on !s@
      position r.p1,r.p2;
      expression x,E;
      statement S1,S2;
      @@
      
      (
      - if ((x@p2 != NULL) || ...)
        S1
      |
      - if ((x@p2 == NULL) && ...) S1
      |
      - BUG_ON(x@p2 == NULL);
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      00185a60
  2. 18 3月, 2009 7 次提交
  3. 28 2月, 2009 2 次提交
  4. 10 2月, 2009 6 次提交
  5. 28 1月, 2009 7 次提交
  6. 16 1月, 2009 1 次提交
  7. 13 1月, 2009 4 次提交
  8. 08 1月, 2009 6 次提交
  9. 03 1月, 2009 3 次提交