[PATCH v2][for 3.16 0/3] Gadget directory cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a follow-up to this thread:

http://www.spinics.net/lists/linux-usb/msg107611.html

This refactoring has been accepted well, so I am sending it
once 3.16-rc1 is out in order to make it easy to apply it.

The cleanup rearranges the way source code files are located in the
drivers/usb/gadget directory. New subdirectories are introduced:

- "udc" for UDC chip drivers
- "function" for actual usb functions' implementations
- "legacy" for gadgets compiled as statically composed modules

while at the gadget's root level there are files related to the composite
framework.

These are the reasons for doing such a change:

- there are ~130 source code files already in a clean tree

- when all gadgets and some udc drivers are built as modules then,
including the by-products of the build (*.o, *.ko, *.mod.c, .*.cmd),
the number easily grows to ~500 files

- files serving different purpose (udc chip drivers, actual gadget functions'
implementations, legacy gadgets) are located side-by-side which might cause
confusion

- gadget's Kconfig and Makefile tend to be lengthy.

After the patches are applied the gadget subdirectory looks much cleaner.

Rebased onto Greg's usb-next.

Andrzej Pietrasiewicz (3):
  usb: gadget: Gadget directory cleanup - group legacy gadgets
  usb: gadget: Gadget directory cleanup - group UDC drivers
  usb: gadget: Gadget directory cleanup - group usb functions

 drivers/usb/gadget/Kconfig                         | 824 +--------------------
 drivers/usb/gadget/Makefile                        | 102 +--
 drivers/usb/gadget/function/Makefile               |  34 +
 drivers/usb/gadget/{ => function}/f_acm.c          |   0
 drivers/usb/gadget/{ => function}/f_ecm.c          |   0
 drivers/usb/gadget/{ => function}/f_eem.c          |   0
 drivers/usb/gadget/{ => function}/f_fs.c           |   0
 drivers/usb/gadget/{ => function}/f_hid.c          |   0
 drivers/usb/gadget/{ => function}/f_loopback.c     |   0
 drivers/usb/gadget/{ => function}/f_mass_storage.c |   0
 drivers/usb/gadget/{ => function}/f_mass_storage.h |   0
 drivers/usb/gadget/{ => function}/f_midi.c         |   0
 drivers/usb/gadget/{ => function}/f_ncm.c          |   0
 drivers/usb/gadget/{ => function}/f_obex.c         |   0
 drivers/usb/gadget/{ => function}/f_phonet.c       |   0
 drivers/usb/gadget/{ => function}/f_rndis.c        |   0
 drivers/usb/gadget/{ => function}/f_serial.c       |   0
 drivers/usb/gadget/{ => function}/f_sourcesink.c   |   0
 drivers/usb/gadget/{ => function}/f_subset.c       |   0
 drivers/usb/gadget/{ => function}/f_uac1.c         |   0
 drivers/usb/gadget/{ => function}/f_uac2.c         |   0
 drivers/usb/gadget/{ => function}/f_uvc.c          |   0
 drivers/usb/gadget/{ => function}/f_uvc.h          |   0
 drivers/usb/gadget/{ => function}/g_zero.h         |   0
 drivers/usb/gadget/{ => function}/ndis.h           |   0
 drivers/usb/gadget/{ => function}/rndis.c          |   0
 drivers/usb/gadget/{ => function}/rndis.h          |   0
 drivers/usb/gadget/{ => function}/storage_common.c |   0
 drivers/usb/gadget/{ => function}/storage_common.h |   0
 drivers/usb/gadget/{ => function}/u_ecm.h          |   0
 drivers/usb/gadget/{ => function}/u_eem.h          |   0
 drivers/usb/gadget/{ => function}/u_ether.c        |   0
 drivers/usb/gadget/{ => function}/u_ether.h        |   0
 .../usb/gadget/{ => function}/u_ether_configfs.h   |   0
 drivers/usb/gadget/{ => function}/u_fs.h           |   0
 drivers/usb/gadget/{ => function}/u_gether.h       |   0
 drivers/usb/gadget/{ => function}/u_ncm.h          |   0
 drivers/usb/gadget/{ => function}/u_phonet.h       |   0
 drivers/usb/gadget/{ => function}/u_rndis.h        |   0
 drivers/usb/gadget/{ => function}/u_serial.c       |   0
 drivers/usb/gadget/{ => function}/u_serial.h       |   0
 drivers/usb/gadget/{ => function}/u_uac1.c         |   0
 drivers/usb/gadget/{ => function}/u_uac1.h         |   0
 drivers/usb/gadget/{ => function}/uvc.h            |   0
 drivers/usb/gadget/{ => function}/uvc_queue.c      |   0
 drivers/usb/gadget/{ => function}/uvc_queue.h      |   0
 drivers/usb/gadget/{ => function}/uvc_v4l2.c       |   0
 drivers/usb/gadget/{ => function}/uvc_video.c      |   0
 drivers/usb/gadget/legacy/Kconfig                  | 475 ++++++++++++
 drivers/usb/gadget/legacy/Makefile                 |  44 ++
 drivers/usb/gadget/{ => legacy}/acm_ms.c           |   0
 drivers/usb/gadget/{ => legacy}/audio.c            |   0
 drivers/usb/gadget/{ => legacy}/cdc2.c             |   0
 drivers/usb/gadget/{ => legacy}/dbgp.c             |   0
 drivers/usb/gadget/{ => legacy}/ether.c            |   0
 drivers/usb/gadget/{ => legacy}/g_ffs.c            |   0
 drivers/usb/gadget/{ => legacy}/gmidi.c            |   0
 drivers/usb/gadget/{ => legacy}/hid.c              |   0
 drivers/usb/gadget/{ => legacy}/inode.c            |   0
 drivers/usb/gadget/{ => legacy}/mass_storage.c     |   0
 drivers/usb/gadget/{ => legacy}/multi.c            |   0
 drivers/usb/gadget/{ => legacy}/ncm.c              |   0
 drivers/usb/gadget/{ => legacy}/nokia.c            |   0
 drivers/usb/gadget/{ => legacy}/printer.c          |   0
 drivers/usb/gadget/{ => legacy}/serial.c           |   0
 drivers/usb/gadget/{ => legacy}/tcm_usb_gadget.c   |   0
 drivers/usb/gadget/{ => legacy}/tcm_usb_gadget.h   |   0
 drivers/usb/gadget/{ => legacy}/webcam.c           |   0
 drivers/usb/gadget/{ => legacy}/zero.c             |   0
 drivers/usb/gadget/udc/Kconfig                     | 377 ++++++++++
 drivers/usb/gadget/udc/Makefile                    |  31 +
 drivers/usb/gadget/{ => udc}/amd5536udc.c          |   0
 drivers/usb/gadget/{ => udc}/amd5536udc.h          |   0
 drivers/usb/gadget/{ => udc}/at91_udc.c            |   0
 drivers/usb/gadget/{ => udc}/at91_udc.h            |   0
 drivers/usb/gadget/{ => udc}/atmel_usba_udc.c      |   0
 drivers/usb/gadget/{ => udc}/atmel_usba_udc.h      |   0
 drivers/usb/gadget/{ => udc}/bcm63xx_udc.c         |   0
 drivers/usb/gadget/{ => udc}/dummy_hcd.c           |   0
 drivers/usb/gadget/{ => udc}/fotg210-udc.c         |   0
 drivers/usb/gadget/{ => udc}/fotg210.h             |   0
 drivers/usb/gadget/{ => udc}/fsl_mxc_udc.c         |   0
 drivers/usb/gadget/{ => udc}/fsl_qe_udc.c          |   0
 drivers/usb/gadget/{ => udc}/fsl_qe_udc.h          |   0
 drivers/usb/gadget/{ => udc}/fsl_udc_core.c        |   0
 drivers/usb/gadget/{ => udc}/fsl_usb2_udc.h        |   0
 drivers/usb/gadget/{ => udc}/fusb300_udc.c         |   0
 drivers/usb/gadget/{ => udc}/fusb300_udc.h         |   0
 drivers/usb/gadget/{ => udc}/gadget_chips.h        |   0
 drivers/usb/gadget/{ => udc}/goku_udc.c            |   0
 drivers/usb/gadget/{ => udc}/goku_udc.h            |   0
 drivers/usb/gadget/{ => udc}/gr_udc.c              |   0
 drivers/usb/gadget/{ => udc}/gr_udc.h              |   0
 drivers/usb/gadget/{ => udc}/lpc32xx_udc.c         |   0
 drivers/usb/gadget/{ => udc}/m66592-udc.c          |   0
 drivers/usb/gadget/{ => udc}/m66592-udc.h          |   0
 drivers/usb/gadget/{ => udc}/mv_u3d.h              |   0
 drivers/usb/gadget/{ => udc}/mv_u3d_core.c         |   0
 drivers/usb/gadget/{ => udc}/mv_udc.h              |   0
 drivers/usb/gadget/{ => udc}/mv_udc_core.c         |   0
 drivers/usb/gadget/{ => udc}/net2272.c             |   0
 drivers/usb/gadget/{ => udc}/net2272.h             |   0
 drivers/usb/gadget/{ => udc}/net2280.c             |   0
 drivers/usb/gadget/{ => udc}/net2280.h             |   0
 drivers/usb/gadget/{ => udc}/omap_udc.c            |   0
 drivers/usb/gadget/{ => udc}/omap_udc.h            |   0
 drivers/usb/gadget/{ => udc}/pch_udc.c             |   0
 drivers/usb/gadget/{ => udc}/pxa25x_udc.c          |   0
 drivers/usb/gadget/{ => udc}/pxa25x_udc.h          |   0
 drivers/usb/gadget/{ => udc}/pxa27x_udc.c          |   0
 drivers/usb/gadget/{ => udc}/pxa27x_udc.h          |   0
 drivers/usb/gadget/{ => udc}/r8a66597-udc.c        |   0
 drivers/usb/gadget/{ => udc}/r8a66597-udc.h        |   0
 drivers/usb/gadget/{ => udc}/s3c-hsudc.c           |   0
 drivers/usb/gadget/{ => udc}/s3c2410_udc.c         |   0
 drivers/usb/gadget/{ => udc}/s3c2410_udc.h         |   0
 drivers/usb/gadget/{ => udc}/udc-core.c            |   0
 117 files changed, 967 insertions(+), 920 deletions(-)
 create mode 100644 drivers/usb/gadget/function/Makefile
 rename drivers/usb/gadget/{ => function}/f_acm.c (100%)
 rename drivers/usb/gadget/{ => function}/f_ecm.c (100%)
 rename drivers/usb/gadget/{ => function}/f_eem.c (100%)
 rename drivers/usb/gadget/{ => function}/f_fs.c (100%)
 rename drivers/usb/gadget/{ => function}/f_hid.c (100%)
 rename drivers/usb/gadget/{ => function}/f_loopback.c (100%)
 rename drivers/usb/gadget/{ => function}/f_mass_storage.c (100%)
 rename drivers/usb/gadget/{ => function}/f_mass_storage.h (100%)
 rename drivers/usb/gadget/{ => function}/f_midi.c (100%)
 rename drivers/usb/gadget/{ => function}/f_ncm.c (100%)
 rename drivers/usb/gadget/{ => function}/f_obex.c (100%)
 rename drivers/usb/gadget/{ => function}/f_phonet.c (100%)
 rename drivers/usb/gadget/{ => function}/f_rndis.c (100%)
 rename drivers/usb/gadget/{ => function}/f_serial.c (100%)
 rename drivers/usb/gadget/{ => function}/f_sourcesink.c (100%)
 rename drivers/usb/gadget/{ => function}/f_subset.c (100%)
 rename drivers/usb/gadget/{ => function}/f_uac1.c (100%)
 rename drivers/usb/gadget/{ => function}/f_uac2.c (100%)
 rename drivers/usb/gadget/{ => function}/f_uvc.c (100%)
 rename drivers/usb/gadget/{ => function}/f_uvc.h (100%)
 rename drivers/usb/gadget/{ => function}/g_zero.h (100%)
 rename drivers/usb/gadget/{ => function}/ndis.h (100%)
 rename drivers/usb/gadget/{ => function}/rndis.c (100%)
 rename drivers/usb/gadget/{ => function}/rndis.h (100%)
 rename drivers/usb/gadget/{ => function}/storage_common.c (100%)
 rename drivers/usb/gadget/{ => function}/storage_common.h (100%)
 rename drivers/usb/gadget/{ => function}/u_ecm.h (100%)
 rename drivers/usb/gadget/{ => function}/u_eem.h (100%)
 rename drivers/usb/gadget/{ => function}/u_ether.c (100%)
 rename drivers/usb/gadget/{ => function}/u_ether.h (100%)
 rename drivers/usb/gadget/{ => function}/u_ether_configfs.h (100%)
 rename drivers/usb/gadget/{ => function}/u_fs.h (100%)
 rename drivers/usb/gadget/{ => function}/u_gether.h (100%)
 rename drivers/usb/gadget/{ => function}/u_ncm.h (100%)
 rename drivers/usb/gadget/{ => function}/u_phonet.h (100%)
 rename drivers/usb/gadget/{ => function}/u_rndis.h (100%)
 rename drivers/usb/gadget/{ => function}/u_serial.c (100%)
 rename drivers/usb/gadget/{ => function}/u_serial.h (100%)
 rename drivers/usb/gadget/{ => function}/u_uac1.c (100%)
 rename drivers/usb/gadget/{ => function}/u_uac1.h (100%)
 rename drivers/usb/gadget/{ => function}/uvc.h (100%)
 rename drivers/usb/gadget/{ => function}/uvc_queue.c (100%)
 rename drivers/usb/gadget/{ => function}/uvc_queue.h (100%)
 rename drivers/usb/gadget/{ => function}/uvc_v4l2.c (100%)
 rename drivers/usb/gadget/{ => function}/uvc_video.c (100%)
 create mode 100644 drivers/usb/gadget/legacy/Kconfig
 create mode 100644 drivers/usb/gadget/legacy/Makefile
 rename drivers/usb/gadget/{ => legacy}/acm_ms.c (100%)
 rename drivers/usb/gadget/{ => legacy}/audio.c (100%)
 rename drivers/usb/gadget/{ => legacy}/cdc2.c (100%)
 rename drivers/usb/gadget/{ => legacy}/dbgp.c (100%)
 rename drivers/usb/gadget/{ => legacy}/ether.c (100%)
 rename drivers/usb/gadget/{ => legacy}/g_ffs.c (100%)
 rename drivers/usb/gadget/{ => legacy}/gmidi.c (100%)
 rename drivers/usb/gadget/{ => legacy}/hid.c (100%)
 rename drivers/usb/gadget/{ => legacy}/inode.c (100%)
 rename drivers/usb/gadget/{ => legacy}/mass_storage.c (100%)
 rename drivers/usb/gadget/{ => legacy}/multi.c (100%)
 rename drivers/usb/gadget/{ => legacy}/ncm.c (100%)
 rename drivers/usb/gadget/{ => legacy}/nokia.c (100%)
 rename drivers/usb/gadget/{ => legacy}/printer.c (100%)
 rename drivers/usb/gadget/{ => legacy}/serial.c (100%)
 rename drivers/usb/gadget/{ => legacy}/tcm_usb_gadget.c (100%)
 rename drivers/usb/gadget/{ => legacy}/tcm_usb_gadget.h (100%)
 rename drivers/usb/gadget/{ => legacy}/webcam.c (100%)
 rename drivers/usb/gadget/{ => legacy}/zero.c (100%)
 create mode 100644 drivers/usb/gadget/udc/Kconfig
 create mode 100644 drivers/usb/gadget/udc/Makefile
 rename drivers/usb/gadget/{ => udc}/amd5536udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/amd5536udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/at91_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/at91_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/atmel_usba_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/atmel_usba_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/bcm63xx_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/dummy_hcd.c (100%)
 rename drivers/usb/gadget/{ => udc}/fotg210-udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/fotg210.h (100%)
 rename drivers/usb/gadget/{ => udc}/fsl_mxc_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/fsl_qe_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/fsl_qe_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/fsl_udc_core.c (100%)
 rename drivers/usb/gadget/{ => udc}/fsl_usb2_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/fusb300_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/fusb300_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/gadget_chips.h (100%)
 rename drivers/usb/gadget/{ => udc}/goku_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/goku_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/gr_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/gr_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/lpc32xx_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/m66592-udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/m66592-udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/mv_u3d.h (100%)
 rename drivers/usb/gadget/{ => udc}/mv_u3d_core.c (100%)
 rename drivers/usb/gadget/{ => udc}/mv_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/mv_udc_core.c (100%)
 rename drivers/usb/gadget/{ => udc}/net2272.c (100%)
 rename drivers/usb/gadget/{ => udc}/net2272.h (100%)
 rename drivers/usb/gadget/{ => udc}/net2280.c (100%)
 rename drivers/usb/gadget/{ => udc}/net2280.h (100%)
 rename drivers/usb/gadget/{ => udc}/omap_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/omap_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/pch_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/pxa25x_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/pxa25x_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/pxa27x_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/pxa27x_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/r8a66597-udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/r8a66597-udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/s3c-hsudc.c (100%)
 rename drivers/usb/gadget/{ => udc}/s3c2410_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/s3c2410_udc.h (100%)
 rename drivers/usb/gadget/{ => udc}/udc-core.c (100%)

-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux