USB: include/usb/*.h checkpatch cleanup
Lots of minor formatting cleanups in includes/usb/ to make checkpatch happier. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
812219ab8f
commit
0858a3a52f
|
@ -477,7 +477,7 @@ static inline int usb_endpoint_xfer_isoc(
|
|||
static inline int usb_endpoint_is_bulk_in(
|
||||
const struct usb_endpoint_descriptor *epd)
|
||||
{
|
||||
return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd));
|
||||
return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -490,7 +490,7 @@ static inline int usb_endpoint_is_bulk_in(
|
|||
static inline int usb_endpoint_is_bulk_out(
|
||||
const struct usb_endpoint_descriptor *epd)
|
||||
{
|
||||
return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd));
|
||||
return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -503,7 +503,7 @@ static inline int usb_endpoint_is_bulk_out(
|
|||
static inline int usb_endpoint_is_int_in(
|
||||
const struct usb_endpoint_descriptor *epd)
|
||||
{
|
||||
return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd));
|
||||
return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -516,7 +516,7 @@ static inline int usb_endpoint_is_int_in(
|
|||
static inline int usb_endpoint_is_int_out(
|
||||
const struct usb_endpoint_descriptor *epd)
|
||||
{
|
||||
return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd));
|
||||
return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -529,7 +529,7 @@ static inline int usb_endpoint_is_int_out(
|
|||
static inline int usb_endpoint_is_isoc_in(
|
||||
const struct usb_endpoint_descriptor *epd)
|
||||
{
|
||||
return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd));
|
||||
return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -542,7 +542,7 @@ static inline int usb_endpoint_is_isoc_in(
|
|||
static inline int usb_endpoint_is_isoc_out(
|
||||
const struct usb_endpoint_descriptor *epd)
|
||||
{
|
||||
return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd));
|
||||
return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#define __LINUX_USB_GADGETFS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/ioctl.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#include <linux/usb/ch9.h>
|
||||
|
||||
|
|
|
@ -265,16 +265,18 @@ struct hc_driver {
|
|||
/* Note that add_endpoint() can only be called once per endpoint before
|
||||
* check_bandwidth() or reset_bandwidth() must be called.
|
||||
* drop_endpoint() can only be called once per endpoint also.
|
||||
* A call to xhci_drop_endpoint() followed by a call to xhci_add_endpoint() will
|
||||
* add the endpoint to the schedule with possibly new parameters denoted by a
|
||||
* different endpoint descriptor in usb_host_endpoint.
|
||||
* A call to xhci_add_endpoint() followed by a call to xhci_drop_endpoint() is
|
||||
* not allowed.
|
||||
* A call to xhci_drop_endpoint() followed by a call to
|
||||
* xhci_add_endpoint() will add the endpoint to the schedule with
|
||||
* possibly new parameters denoted by a different endpoint descriptor
|
||||
* in usb_host_endpoint. A call to xhci_add_endpoint() followed by a
|
||||
* call to xhci_drop_endpoint() is not allowed.
|
||||
*/
|
||||
/* Allocate endpoint resources and add them to a new schedule */
|
||||
int (*add_endpoint)(struct usb_hcd *, struct usb_device *, struct usb_host_endpoint *);
|
||||
int (*add_endpoint)(struct usb_hcd *, struct usb_device *,
|
||||
struct usb_host_endpoint *);
|
||||
/* Drop an endpoint from a new schedule */
|
||||
int (*drop_endpoint)(struct usb_hcd *, struct usb_device *, struct usb_host_endpoint *);
|
||||
int (*drop_endpoint)(struct usb_hcd *, struct usb_device *,
|
||||
struct usb_host_endpoint *);
|
||||
/* Check that a new hardware configuration, set using
|
||||
* endpoint_enable and endpoint_disable, does not exceed bus
|
||||
* bandwidth. This must be called before any set configuration
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
struct rndis_msg_hdr {
|
||||
__le32 msg_type; /* RNDIS_MSG_* */
|
||||
__le32 msg_len;
|
||||
// followed by data that varies between messages
|
||||
/* followed by data that varies between messages */
|
||||
__le32 request_id;
|
||||
__le32 status;
|
||||
// ... and more
|
||||
/* ... and more */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* MS-Windows uses this strange size, but RNDIS spec says 1024 minimum */
|
||||
|
@ -92,67 +92,67 @@ struct rndis_msg_hdr {
|
|||
|
||||
struct rndis_data_hdr {
|
||||
__le32 msg_type; /* RNDIS_MSG_PACKET */
|
||||
__le32 msg_len; // rndis_data_hdr + data_len + pad
|
||||
__le32 data_offset; // 36 -- right after header
|
||||
__le32 data_len; // ... real packet size
|
||||
__le32 msg_len; /* rndis_data_hdr + data_len + pad */
|
||||
__le32 data_offset; /* 36 -- right after header */
|
||||
__le32 data_len; /* ... real packet size */
|
||||
|
||||
__le32 oob_data_offset; // zero
|
||||
__le32 oob_data_len; // zero
|
||||
__le32 num_oob; // zero
|
||||
__le32 packet_data_offset; // zero
|
||||
__le32 oob_data_offset; /* zero */
|
||||
__le32 oob_data_len; /* zero */
|
||||
__le32 num_oob; /* zero */
|
||||
__le32 packet_data_offset; /* zero */
|
||||
|
||||
__le32 packet_data_len; // zero
|
||||
__le32 vc_handle; // zero
|
||||
__le32 reserved; // zero
|
||||
__le32 packet_data_len; /* zero */
|
||||
__le32 vc_handle; /* zero */
|
||||
__le32 reserved; /* zero */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_init { /* OUT */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_INIT */
|
||||
__le32 msg_len; // 24
|
||||
__le32 msg_len; /* 24 */
|
||||
__le32 request_id;
|
||||
__le32 major_version; // of rndis (1.0)
|
||||
__le32 major_version; /* of rndis (1.0) */
|
||||
__le32 minor_version;
|
||||
__le32 max_transfer_size;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_init_c { /* IN */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_INIT_C */
|
||||
__le32 msg_len;
|
||||
__le32 request_id;
|
||||
__le32 status;
|
||||
__le32 major_version; // of rndis (1.0)
|
||||
__le32 major_version; /* of rndis (1.0) */
|
||||
__le32 minor_version;
|
||||
__le32 device_flags;
|
||||
__le32 medium; // zero == 802.3
|
||||
__le32 medium; /* zero == 802.3 */
|
||||
__le32 max_packets_per_message;
|
||||
__le32 max_transfer_size;
|
||||
__le32 packet_alignment; // max 7; (1<<n) bytes
|
||||
__le32 af_list_offset; // zero
|
||||
__le32 af_list_size; // zero
|
||||
__le32 packet_alignment; /* max 7; (1<<n) bytes */
|
||||
__le32 af_list_offset; /* zero */
|
||||
__le32 af_list_size; /* zero */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_halt { /* OUT (no reply) */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_HALT */
|
||||
__le32 msg_len;
|
||||
__le32 request_id;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_query { /* OUT */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_QUERY */
|
||||
__le32 msg_len;
|
||||
__le32 request_id;
|
||||
__le32 oid;
|
||||
__le32 len;
|
||||
__le32 offset;
|
||||
/*?*/ __le32 handle; // zero
|
||||
/*?*/ __le32 handle; /* zero */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_query_c { /* IN */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_QUERY_C */
|
||||
__le32 msg_len;
|
||||
__le32 request_id;
|
||||
|
@ -162,18 +162,18 @@ struct rndis_query_c { /* IN */
|
|||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_set { /* OUT */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_SET */
|
||||
__le32 msg_len;
|
||||
__le32 request_id;
|
||||
__le32 oid;
|
||||
__le32 len;
|
||||
__le32 offset;
|
||||
/*?*/ __le32 handle; // zero
|
||||
/*?*/ __le32 handle; /* zero */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_set_c { /* IN */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_SET_C */
|
||||
__le32 msg_len;
|
||||
__le32 request_id;
|
||||
|
@ -181,14 +181,14 @@ struct rndis_set_c { /* IN */
|
|||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_reset { /* IN */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_RESET */
|
||||
__le32 msg_len;
|
||||
__le32 reserved;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_reset_c { /* OUT */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_RESET_C */
|
||||
__le32 msg_len;
|
||||
__le32 status;
|
||||
|
@ -196,7 +196,7 @@ struct rndis_reset_c { /* OUT */
|
|||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_indicate { /* IN (unrequested) */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_INDICATE */
|
||||
__le32 msg_len;
|
||||
__le32 status;
|
||||
|
@ -208,14 +208,14 @@ struct rndis_indicate { /* IN (unrequested) */
|
|||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_keepalive { /* OUT (optionally IN) */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_KEEPALIVE */
|
||||
__le32 msg_len;
|
||||
__le32 request_id;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rndis_keepalive_c { /* IN (optionally OUT) */
|
||||
// header and:
|
||||
/* header and: */
|
||||
__le32 msg_type; /* RNDIS_MSG_KEEPALIVE_C */
|
||||
__le32 msg_len;
|
||||
__le32 request_id;
|
||||
|
|
|
@ -206,8 +206,10 @@ extern void usbnet_pause_rx(struct usbnet *);
|
|||
extern void usbnet_resume_rx(struct usbnet *);
|
||||
extern void usbnet_purge_paused_rxq(struct usbnet *);
|
||||
|
||||
extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd);
|
||||
extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd);
|
||||
extern int usbnet_get_settings(struct net_device *net,
|
||||
struct ethtool_cmd *cmd);
|
||||
extern int usbnet_set_settings(struct net_device *net,
|
||||
struct ethtool_cmd *cmd);
|
||||
extern u32 usbnet_get_link(struct net_device *net);
|
||||
extern u32 usbnet_get_msglevel(struct net_device *);
|
||||
extern void usbnet_set_msglevel(struct net_device *, u32);
|
||||
|
|
Loading…
Reference in New Issue