Re: [PATCH 4/6] usb: gadget: storage_common: Drop #ifdefs used for the sake of FSG.

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

 



On Wed, Oct 31, 2012 at 09:32:37PM +0100, Michal Nazarewicz wrote:
> diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
> index 3433e43..5d027b3 100644
> --- a/drivers/usb/gadget/f_mass_storage.c
> +++ b/drivers/usb/gadget/f_mass_storage.c
> @@ -228,10 +228,6 @@
>  
>  static const char fsg_string_interface[] = "Mass Storage";
>  
> -#define FSG_NO_DEVICE_STRINGS    1
> -#define FSG_NO_OTG               1
> -#define FSG_NO_INTR_EP           1
> -
>  #include "storage_common.c"
>  

One piece that this patch removes is the INTR ep stuff for the CBI protocol.
It was only implemented in FSG and since it is declared as deprecated in the
USB mass storage spec there is no need to implement it in the other gadget.
That said, could you please melt this piece into it?

diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index 14199d7..64d0222 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -141,18 +141,6 @@
 
 /*-------------------------------------------------------------------------*/
 
-/* CBI Interrupt data structure */
-struct interrupt_data {
-       u8      bType;
-       u8      bValue;
-};
-
-#define CBI_INTERRUPT_DATA_LEN         2
-
-/* CBI Accept Device-Specific Command request */
-#define USB_CBI_ADSC_REQUEST           0x00
-
-

There is one more reference to CBI in a comment in f_mass_storage.c which
could go as well I think.

Sebastian
--
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