summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/config.c2
-rw-r--r--drivers/usb/gadget/core.c12
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg_regs.h1
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c4
-rw-r--r--drivers/usb/gadget/ep0.c4
-rw-r--r--drivers/usb/gadget/ep0.h2
-rw-r--r--drivers/usb/gadget/epautoconf.c1
-rw-r--r--drivers/usb/gadget/ether.c4
-rw-r--r--drivers/usb/gadget/f_mass_storage.c19
-rw-r--r--drivers/usb/gadget/f_sdp.c1
-rw-r--r--drivers/usb/gadget/ndis.h2
-rw-r--r--drivers/usb/gadget/rndis.c3
-rw-r--r--drivers/usb/gadget/rndis.h1
-rw-r--r--drivers/usb/gadget/storage_common.c3
14 files changed, 0 insertions, 59 deletions
diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
index 1363ef9e73d..e41b1d964ea 100644
--- a/drivers/usb/gadget/config.c
+++ b/drivers/usb/gadget/config.c
@@ -16,7 +16,6 @@
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
-
/**
* usb_descriptor_fillbuf - fill buffer with descriptors
* @buf: Buffer to be filled
@@ -51,7 +50,6 @@ usb_descriptor_fillbuf(void *buf, unsigned buflen,
return dest - (u8 *)buf;
}
-
/**
* usb_gadget_config_buf - builts a complete configuration descriptor
* @config: Header for the descriptor, including characteristics such
diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c
index 888f0cfea66..bcb1ad3082c 100644
--- a/drivers/usb/gadget/core.c
+++ b/drivers/usb/gadget/core.c
@@ -22,7 +22,6 @@
#define MAX_INTERFACES 2
-
int maxstrings = 20;
/* Global variables ************************************************************************** */
@@ -65,10 +64,8 @@ __maybe_unused static char *usbd_device_status[] = {
#define USBD_DEVICE_STATUS(x) (((unsigned int)x <= USBD_CLOSING) ? usbd_device_status[x] : "UNKNOWN")
-
/* Descriptor support functions ************************************************************** */
-
/**
* usbd_get_string - find and return a string descriptor
* @index: string index to return
@@ -83,10 +80,8 @@ struct usb_string_descriptor *usbd_get_string (__u8 index)
return usb_strings[index];
}
-
/* Access to device descriptor functions ***************************************************** */
-
/* *
* usbd_device_configuration_instance - find a configuration instance for this device
* @device:
@@ -103,7 +98,6 @@ static struct usb_configuration_instance *usbd_device_configuration_instance (st
return device->configuration_instance_array + configuration;
}
-
/* *
* usbd_device_interface_instance
* @device:
@@ -149,7 +143,6 @@ struct usb_alternate_instance *usbd_device_alternate_instance (struct usb_device
return interface_instance->alternates_instance_array + alternate;
}
-
/* *
* usbd_device_device_descriptor
* @device: which device
@@ -182,7 +175,6 @@ struct usb_configuration_descriptor *usbd_device_configuration_descriptor (struc
return (configuration_instance->configuration_descriptor);
}
-
/**
* usbd_device_interface_descriptor
* @device: which device
@@ -231,7 +223,6 @@ struct usb_endpoint_descriptor *usbd_device_endpoint_descriptor_index (struct us
return *(alternate_instance->endpoints_descriptor_array + index);
}
-
/**
* usbd_device_endpoint_transfersize
* @device: which device
@@ -255,7 +246,6 @@ int usbd_device_endpoint_transfersize (struct usb_device_instance *device, int p
return *(alternate_instance->endpoint_transfersize_array + index);
}
-
/**
* usbd_device_endpoint_descriptor
* @device: which device
@@ -292,7 +282,6 @@ int usbd_endpoint_halted (struct usb_device_instance *device, int endpoint)
return (device->status == USB_STATUS_HALT);
}
-
/**
* usbd_rcv_complete - complete a receive
* @endpoint:
@@ -460,7 +449,6 @@ struct urb *first_urb_detached (urb_link * hd)
return urb;
}
-
/*
* Append an urb_link (or a whole list of
* urb_links) to the tail of another list
diff --git a/drivers/usb/gadget/dwc2_udc_otg_regs.h b/drivers/usb/gadget/dwc2_udc_otg_regs.h
index 9ca6f423757..01056fab1c2 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_regs.h
+++ b/drivers/usb/gadget/dwc2_udc_otg_regs.h
@@ -204,7 +204,6 @@ struct dwc2_usbotg_reg {
#define DIEPCTL0_NEXT_EP_BIT (11)
-
/* DWC2_UDC_OTG_DIEPMSK/DOEPMSK device IN/OUT endpoint
common interrupt mask register */
/* DWC2_UDC_OTG_DIEPINTn/DOEPINTn device IN/OUT endpoint interrupt register */
diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
index 16b2a03f9e4..c0408bae076 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
@@ -92,7 +92,6 @@ static inline void dwc2_ep0_complete_out(void)
}
-
static int setdma_rx(struct dwc2_ep *ep, struct dwc2_request *req)
{
u32 *buf, ctrl;
@@ -972,7 +971,6 @@ static void dwc2_udc_set_nak(struct dwc2_ep *ep)
return;
}
-
static void dwc2_udc_ep_set_stall(struct dwc2_ep *ep)
{
u8 ep_num;
@@ -1440,7 +1438,6 @@ static void dwc2_ep0_setup(struct dwc2_udc *dev)
}
}
-
if (likely(dev->driver)) {
/* device-2-host (IN) or no data setup command,
* process immediately */
@@ -1462,7 +1459,6 @@ static void dwc2_ep0_setup(struct dwc2_udc *dev)
" bRequest = %d\n",
i, usb_ctrl->bRequest);
-
} else if (dev->req_pending) {
dev->req_pending = 0;
debug_cond(DEBUG_SETUP != 0,
diff --git a/drivers/usb/gadget/ep0.c b/drivers/usb/gadget/ep0.c
index 9d08640ff23..8c7fc17c2ea 100644
--- a/drivers/usb/gadget/ep0.c
+++ b/drivers/usb/gadget/ep0.c
@@ -93,7 +93,6 @@ __maybe_unused static char *usbd_device_requests[] = {
/* EP0 Configuration Set ********************************************************************* */
-
/**
* ep0_get_status - fill in URB data with appropriate status
* @device:
@@ -376,7 +375,6 @@ static int ep0_get_descriptor (struct usb_device_instance *device,
return -1;
}
-
dbg_ep0 (1, "urb: buffer: %p buffer_length: %2d actual_length: %2d tx_packetSize: %2d",
urb->buffer, urb->buffer_length, urb->actual_length,
device->bus->endpoint_array[0].tx_packetSize);
@@ -421,7 +419,6 @@ int ep0_recv_setup (struct urb *urb)
dbg_ep0 (3, "urb: %p device: %p", urb, urb->device);
-
/*dbg_ep0(2, "- - - - - - - - - -"); */
dbg_ep0 (2,
@@ -533,7 +530,6 @@ int ep0_recv_setup (struct urb *urb)
/* handle the requests that do not return data */
else {
-
/*dbg_ep0(3, "Host-to-Device"); */
switch (request->bRequest) {
diff --git a/drivers/usb/gadget/ep0.h b/drivers/usb/gadget/ep0.h
index 976825ab93e..a16d36be938 100644
--- a/drivers/usb/gadget/ep0.h
+++ b/drivers/usb/gadget/ep0.h
@@ -18,8 +18,6 @@
#ifndef __USBDCORE_EP0_H__
#define __USBDCORE_EP0_H__
-
int ep0_recv_setup (struct urb *urb);
-
#endif
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index a4da4f72de9..495460473e9 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -24,7 +24,6 @@ static unsigned epnum;
static unsigned in_epnum;
#endif
-
/*
* This should work with endpoints from controller drivers sharing the
* same endpoint naming convention. By example:
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index b7b7bacb00d..7973927e8a7 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -35,7 +35,6 @@
extern struct platform_data brd;
-
unsigned packet_received, packet_sent;
/*
@@ -273,7 +272,6 @@ static char dev_addr[18];
static char host_addr[18];
-
/*-------------------------------------------------------------------------*/
/*
@@ -806,7 +804,6 @@ static const struct usb_descriptor_header *hs_rndis_function[] = {
};
#endif
-
/* maxpacket and other transfer characteristics vary by speed. */
static inline struct usb_endpoint_descriptor *
ep_desc(struct usb_gadget *g, struct usb_endpoint_descriptor *hs,
@@ -2137,7 +2134,6 @@ autoconf_fail:
#endif
}
-
/* network device setup */
dev->net = l_priv->netdev;
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 89a96dbb7a7..ffe1ae6eb73 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -387,7 +387,6 @@ struct fsg_dev {
struct usb_ep *bulk_out;
};
-
static inline int __fsg_is_set(struct fsg_common *common,
const char *func, unsigned line)
{
@@ -404,13 +403,11 @@ static inline int __fsg_is_set(struct fsg_common *common,
#define fsg_is_set(common) likely(__fsg_is_set(common, __func__, __LINE__))
-
static inline struct fsg_dev *fsg_from_func(struct usb_function *f)
{
return container_of(f, struct fsg_dev, function);
}
-
typedef void (*fsg_routine_t)(struct fsg_dev *);
static int exception_in_progress(struct fsg_common *common)
@@ -1118,7 +1115,6 @@ static int do_inquiry(struct fsg_common *common, struct fsg_buffhd *bh)
return 36;
}
-
static int do_request_sense(struct fsg_common *common, struct fsg_buffhd *bh)
{
struct fsg_lun *curlun = &common->luns[common->lun];
@@ -1210,7 +1206,6 @@ static int do_read_header(struct fsg_common *common, struct fsg_buffhd *bh)
return 8;
}
-
static int do_read_toc(struct fsg_common *common, struct fsg_buffhd *bh)
{
struct fsg_lun *curlun = &common->luns[common->lun];
@@ -1319,7 +1314,6 @@ static int do_mode_sense(struct fsg_common *common, struct fsg_buffhd *bh)
return len;
}
-
static int do_start_stop(struct fsg_common *common)
{
struct fsg_lun *curlun = &common->luns[common->lun];
@@ -1358,7 +1352,6 @@ static int do_prevent_allow(struct fsg_common *common)
return 0;
}
-
static int do_read_format_capacities(struct fsg_common *common,
struct fsg_buffhd *bh)
{
@@ -1376,7 +1369,6 @@ static int do_read_format_capacities(struct fsg_common *common,
return 12;
}
-
static int do_mode_select(struct fsg_common *common, struct fsg_buffhd *bh)
{
struct fsg_lun *curlun = &common->luns[common->lun];
@@ -1387,7 +1379,6 @@ static int do_mode_select(struct fsg_common *common, struct fsg_buffhd *bh)
return -EINVAL;
}
-
/*-------------------------------------------------------------------------*/
static int halt_bulk_in_endpoint(struct fsg_dev *fsg)
@@ -1512,7 +1503,6 @@ static int throw_away_data(struct fsg_common *common)
return 0;
}
-
static int finish_reply(struct fsg_common *common)
{
struct fsg_buffhd *bh = common->next_buffhd_to_fill;
@@ -1608,7 +1598,6 @@ static int finish_reply(struct fsg_common *common)
return rc;
}
-
static int send_status(struct fsg_common *common)
{
struct fsg_lun *curlun = &common->luns[common->lun];
@@ -1664,7 +1653,6 @@ static int send_status(struct fsg_common *common)
return 0;
}
-
/*-------------------------------------------------------------------------*/
/* Check whether the command is properly formed and whether its data size
@@ -1792,7 +1780,6 @@ static int check_command_size_in_blocks(struct fsg_common *common,
mask, needs_medium, name);
}
-
static int do_scsi_command(struct fsg_common *common)
{
struct fsg_buffhd *bh;
@@ -2127,7 +2114,6 @@ static int received_cbw(struct fsg_dev *fsg, struct fsg_buffhd *bh)
return 0;
}
-
static int get_next_command(struct fsg_common *common)
{
struct fsg_buffhd *bh;
@@ -2166,7 +2152,6 @@ static int get_next_command(struct fsg_common *common)
return rc;
}
-
/*-------------------------------------------------------------------------*/
static int enable_endpoint(struct fsg_common *common, struct usb_ep *ep,
@@ -2279,10 +2264,8 @@ reset:
return rc;
}
-
/****************************** ALT CONFIGS ******************************/
-
static int fsg_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
{
struct fsg_dev *fsg = fsg_from_func(f);
@@ -2603,7 +2586,6 @@ static void fsg_common_release(struct kref *ref)
kfree(common);
}
-
/*-------------------------------------------------------------------------*/
/**
@@ -2722,7 +2704,6 @@ autoconf_fail:
return -ENOTSUPP;
}
-
/****************************** ADD FUNCTION ******************************/
static struct usb_gadget_strings *fsg_strings_array[] = {
diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
index 89496917a61..514c097591b 100644
--- a/drivers/usb/gadget/f_sdp.c
+++ b/drivers/usb/gadget/f_sdp.c
@@ -588,7 +588,6 @@ static struct usb_request *alloc_ep_req(struct usb_ep *ep, unsigned length)
return req;
}
-
static struct usb_request *sdp_start_ep(struct usb_ep *ep, bool in)
{
struct usb_request *req;
diff --git a/drivers/usb/gadget/ndis.h b/drivers/usb/gadget/ndis.h
index 753838f7941..371d37ff05a 100644
--- a/drivers/usb/gadget/ndis.h
+++ b/drivers/usb/gadget/ndis.h
@@ -21,7 +21,6 @@
#ifndef _USBGADGET_NDIS_H
#define _USBGADGET_NDIS_H
-
#define NDIS_STATUS_MULTICAST_FULL 0xC0010009
#define NDIS_STATUS_MULTICAST_EXISTS 0xC001000A
#define NDIS_STATUS_MULTICAST_NOT_FOUND 0xC001000B
@@ -60,7 +59,6 @@ struct NDIS_PM_PACKET_PATTERN {
__le32 PatternFlags;
};
-
/* Required Object IDs (OIDs) */
#define OID_GEN_SUPPORTED_LIST 0x00010101
#define OID_GEN_HARDWARE_STATUS 0x00010102
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index 5e6e5a054ca..76801bff9a3 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -53,7 +53,6 @@ static const __le32 rndis_driver_version = __constant_cpu_to_le32(1);
/* Function Prototypes */
static rndis_resp_t *rndis_add_response(int configNr, u32 length);
-
/* supported OIDs */
static const u32 oid_supported_list[] = {
/* the general stuff */
@@ -138,7 +137,6 @@ static const u32 oid_supported_list[] = {
#endif /* RNDIS_PM */
};
-
/* NDIS Functions */
static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf,
unsigned buf_len, rndis_resp_t *r)
@@ -942,7 +940,6 @@ static int rndis_keepalive_response(int configNr,
return 0;
}
-
/*
* Device to Host Comunication
*/
diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h
index 77db55a563f..84b6aeffb08 100644
--- a/drivers/usb/gadget/rndis.h
+++ b/drivers/usb/gadget/rndis.h
@@ -72,7 +72,6 @@
#define OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104
#define OID_PNP_ENABLE_WAKE_UP 0xFD010106
-
typedef struct rndis_init_msg_type {
__le32 MessageType;
__le32 MessageLength;
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index 97dc6b6f729..7e4b542f7ce 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -13,7 +13,6 @@
* Ɓukasz Majewski <l.majewski@samsung.com>
*/
-
/*
* This file requires the following identifiers used in USB strings to
* be defined (each of type pointer to char):
@@ -46,10 +45,8 @@
* characters rather then a pointer to void.
*/
-
/* #include <asm/unaligned.h> */
-
/*
* Thanks to NetChip Technologies for donating this product ID.
*