USB: serial gadget: cleanup/reorg
authorDavid Brownell <david-b@pacbell.net>
Wed, 7 May 2008 23:00:36 +0000 (16:00 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 14 May 2008 17:00:28 +0000 (10:00 -0700)
commit9079e91b5b5a84836e65cdc9128d2602e3beaef2
tree9e3f885e9434418d38802b478ccf385366cbce38
parentfe312e77f0ed4349e908b1575be0d4308f0b2ce4
USB: serial gadget: cleanup/reorg

Some cleanup/reorg of g_serial ... simplifying it, and disentangling
its structure so morphing it into a "function" driver (combinable with
other interfaces) should be less painful.

 - Remove most forward declarations
     * put tty and gadget driver structs after their contents
     * snug module init/exit decls next to their functions
     * reordered some functions

 - Other cleanup:
     * convert a funky macro to an inline function
     * snug up module params next to their declarations
     * add missing driver.owner
     * add separator lines between major driver sections

 - Add comments re potential parameter/#define changes:
     * only supports one port (shrank GS_NUM_PORTS)
     * changing from 9600-8-N-1 affects multiple sites

 - Remove net2280-specific optimization ... it was being done
   way too late, can be done by net2280 module options, and in
   any case doesn't matter at any sane serial data rates.

There are no behavioral changes, but the macro thing saves I-space.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/serial.c