On Mon, 15 Sep 2003 18:12:20 -0700 "Raj, Ashok" <[EMAIL PROTECTED]> wrote:

| Hello
| 
| Someone tried to make psdocs for 2.6.0-test5? I was trying to get some
| documentation for usb, and it seemed successful, just until it reached
| usb stuff..

I'll give it a shot.  I'm no docbook expert, but it failed for me
also in 2.6.0-test5, and works with this patch (below).

David, changes to gadget API OK?

Greg, please apply if OK with David.

--
~Randy


patch_name:     usb_docs.patch
patch_version:  2003-09-16.09:46:34
author:         Randy.Dunlap <[EMAIL PROTECTED]>
description:    fix errors and warnings in 'make {ps,pdf,html}docs' for USB;
product:        Linux
product_versions: 260-test5
changelog:      docbook tools don't like "name : bits", they want "name:bits"
                instead (just warnings, however, not errors);
                more parameters in usb_gadget.h described (although David
                may want to replace them);
                docbook tools found errors in writing_usb_driver.tmpl
                (unmatched tag beginning/endings);
maintainer:     [EMAIL PROTECTED], [EMAIL PROTECTED]
diffstat:       =
 Documentation/DocBook/writing_usb_driver.tmpl |    3 ++-
 include/linux/usb_gadget.h                    |   14 +++++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)


diff -Naurp ./include/linux/usb_gadget.h~docs ./include/linux/usb_gadget.h
--- ./include/linux/usb_gadget.h~docs   2003-09-08 12:50:03.000000000 -0700
+++ ./include/linux/usb_gadget.h        2003-09-16 09:24:05.000000000 -0700
@@ -72,9 +72,9 @@ struct usb_request {
        unsigned                length;
        dma_addr_t              dma;
 
-       unsigned                no_interrupt : 1,
-                               zero : 1,
-                               short_not_ok : 1;
+       unsigned                no_interrupt:1,
+                               zero:1,
+                               short_not_ok:1;
 
        void                    (*complete)(struct usb_ep *ep,
                                        struct usb_request *req);
@@ -122,6 +122,7 @@ struct usb_ep_ops {
 /**
  * struct usb_ep - device side representation of USB endpoint
  * @name:identifier for the endpoint, such as "ep-a" or "ep9in-bulk"
+ * @ops: constant pointer to endpoint operations struct;
  * @ep_list:the gadget's ep_list holds all of its endpoints
  * @maxpacket:the maximum packet size used on this endpoint, as
  *     configured when the endpoint was enabled.
@@ -134,11 +135,10 @@ struct usb_ep_ops {
  */
 struct usb_ep {
        void                    *driver_data;
-
        const char              *name;
        const struct usb_ep_ops *ops;
        struct list_head        ep_list;
-       unsigned                maxpacket : 16;
+       unsigned                maxpacket:16;
 };
 
 /*-------------------------------------------------------------------------*/
@@ -443,12 +443,15 @@ struct usb_gadget_ops {
 
 /**
  * struct usb_gadget - represents a usb slave device
+ * @ops: constant pointer to the gadget's device operations struct;
  * @ep0: Endpoint zero, used when reading or writing responses to
  *     driver setup() requests
  * @ep_list: List of other endpoints supported by the device.
  * @speed: Speed of current connection to USB host.
  * @name: Identifies the controller hardware type.  Used in diagnostics
  *     and sometimes configuration.
+ * @dev: a struct device that is contained (embedded) here; can be used
+ *     in other API calls, for debugging, etc.
  *
  * Gadgets have a mostly-portable "gadget driver" implementing device
  * functions, handling all usb configurations and interfaces.  They
@@ -576,6 +579,7 @@ usb_gadget_clear_selfpowered (struct usb
  *     Called in a context that permits sleeping.
  * @suspend: Invoked on USB suspend.  May be called in_interrupt.
  * @resume: Invoked on USB resume.  May be called in_interrupt.
+ * @driver: a struct device_driver that is contained (embedded) here.
  *
  * Devices are disabled till a gadget driver successfully bind()s, which
  * means the driver will handle setup() requests needed to enumerate (and
diff -Naurp ./Documentation/DocBook/writing_usb_driver.tmpl~docs 
./Documentation/DocBook/writing_usb_driver.tmpl
--- ./Documentation/DocBook/writing_usb_driver.tmpl~docs        2003-09-08 
12:50:04.000000000 -0700
+++ ./Documentation/DocBook/writing_usb_driver.tmpl     2003-09-16 09:42:28.000000000 
-0700
@@ -209,7 +209,7 @@ static int skel_probe(struct usb_interfa
      The driver now needs to verify that this device is actually one that it
      can accept. If so, it returns 0.
      If not, or if any error occurs during initialization, an errorcode
-     (such as <literal>-ENOMEM<literal> or <literal>-ENODEV<literal>)
+     (such as <literal>-ENOMEM</literal> or <literal>-ENODEV</literal>)
      is returned from the probe function.
   </para>
   <para>
@@ -327,6 +327,7 @@ if (!retval) {
      talk to the device, the release function in the driver is called. In this
      function we decrement our private usage count and wait for possible
      pending writes:
+  </para>
   <programlisting>
 /* decrement our usage count for the device */
 --skel->open_count;


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to