diff options
author | Michal Nazarewicz <m.nazarewicz@samsung.com> | 2010-06-25 10:29:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:37 -0400 |
commit | f8dae531ec78ed34f8a845e5f4ff75f0adeb6b13 (patch) | |
tree | 6b51e0cb760b11887d1b16be6f964e9258c95122 /drivers/usb/gadget/Kconfig | |
parent | 541c7d432f76771079e7c295d596ea47cc6a3030 (diff) |
USB: gadget: g_fs: code cleanup
This commit cleans the g_fs gadget hopefully making it more
readable. This is achieved by usage of the usb_string_ids_tab()
function for batch string IDs registration as well as
generalising configuration so that a single routine is
used to add each configuration and bind interfaces. As an
effect, the code is shorter and has fewer #ifdefs.
Moreover, in some circumstances previous code #defined
CONFIG_USB_FUNCTIONFS_GENERIC macro to prevent a situation
where gadget with no configurations is built. This code removes
the #define form source code and achieves the same effect using
select in Kconfig.
This patch also changes wording and names of the Kconfig options.
Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/Kconfig')
-rw-r--r-- | drivers/usb/gadget/Kconfig | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 027f61b1f3d8..dd3b25101858 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig | |||
@@ -714,6 +714,7 @@ config USB_GADGETFS | |||
714 | config USB_FUNCTIONFS | 714 | config USB_FUNCTIONFS |
715 | tristate "Function Filesystem (EXPERIMENTAL)" | 715 | tristate "Function Filesystem (EXPERIMENTAL)" |
716 | depends on EXPERIMENTAL | 716 | depends on EXPERIMENTAL |
717 | select USB_FUNCTIONFS_GENERIC if !(USB_FUNCTIONFS_ETH || USB_FUNCTIONFS_RNDIS) | ||
717 | help | 718 | help |
718 | The Function Filesystem (FunctioFS) lets one create USB | 719 | The Function Filesystem (FunctioFS) lets one create USB |
719 | composite functions in user space in the same way as GadgetFS | 720 | composite functions in user space in the same way as GadgetFS |
@@ -722,31 +723,31 @@ config USB_FUNCTIONFS | |||
722 | implemented in kernel space (for instance Ethernet, serial or | 723 | implemented in kernel space (for instance Ethernet, serial or |
723 | mass storage) and other are implemented in user space. | 724 | mass storage) and other are implemented in user space. |
724 | 725 | ||
726 | If you say "y" or "m" here you will be able what kind of | ||
727 | configurations the gadget will provide. | ||
728 | |||
725 | Say "y" to link the driver statically, or "m" to build | 729 | Say "y" to link the driver statically, or "m" to build |
726 | a dynamically linked module called "g_ffs". | 730 | a dynamically linked module called "g_ffs". |
727 | 731 | ||
728 | config USB_FUNCTIONFS_ETH | 732 | config USB_FUNCTIONFS_ETH |
729 | bool "Include CDC ECM (Ethernet) function" | 733 | bool "Include configuration with CDC ECM (Ethernet)" |
730 | depends on USB_FUNCTIONFS && NET | 734 | depends on USB_FUNCTIONFS && NET |
731 | help | 735 | help |
732 | Include an CDC ECM (Ethernet) funcion in the CDC ECM (Funcion) | 736 | Include a configuration with CDC ECM funcion (Ethernet) and the |
733 | Filesystem. If you also say "y" to the RNDIS query below the | 737 | Funcion Filesystem. |
734 | gadget will have two configurations. | ||
735 | 738 | ||
736 | config USB_FUNCTIONFS_RNDIS | 739 | config USB_FUNCTIONFS_RNDIS |
737 | bool "Include RNDIS (Ethernet) function" | 740 | bool "Include configuration with RNDIS (Ethernet)" |
738 | depends on USB_FUNCTIONFS && NET | 741 | depends on USB_FUNCTIONFS && NET |
739 | help | 742 | help |
740 | Include an RNDIS (Ethernet) funcion in the Funcion Filesystem. | 743 | Include a configuration with RNDIS funcion (Ethernet) and the Filesystem. |
741 | If you also say "y" to the CDC ECM query above the gadget will | ||
742 | have two configurations. | ||
743 | 744 | ||
744 | config USB_FUNCTIONFS_GENERIC | 745 | config USB_FUNCTIONFS_GENERIC |
745 | bool "Include 'pure' configuration" | 746 | bool "Include 'pure' configuration" |
746 | depends on USB_FUNCTIONFS && (USB_FUNCTIONFS_ETH || USB_FUNCTIONFS_RNDIS) | 747 | depends on USB_FUNCTIONFS |
747 | help | 748 | help |
748 | Include a configuration with FunctionFS and no Ethernet | 749 | Include a configuration with the Function Filesystem alone with |
749 | configuration. | 750 | no Ethernet interface. |
750 | 751 | ||
751 | config USB_FILE_STORAGE | 752 | config USB_FILE_STORAGE |
752 | tristate "File-backed Storage Gadget" | 753 | tristate "File-backed Storage Gadget" |