#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include "usb.h"
struct ep_device { … };
#define to_ep_device(_dev) …
struct ep_attribute { … };
#define to_ep_attribute(_attr) …
#define usb_ep_attr(field, format_string) …
usb_ep_attr(…);
usb_ep_attr(…);
usb_ep_attr(…);
usb_ep_attr(…);
static ssize_t wMaxPacketSize_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(wMaxPacketSize);
static ssize_t type_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(type);
static ssize_t interval_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(interval);
static ssize_t direction_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(direction);
static struct attribute *ep_dev_attrs[] = …;
static const struct attribute_group ep_dev_attr_grp = …;
static const struct attribute_group *ep_dev_groups[] = …;
static void ep_device_release(struct device *dev)
{ … }
const struct device_type usb_ep_device_type = …;
int usb_create_ep_devs(struct device *parent,
struct usb_host_endpoint *endpoint,
struct usb_device *udev)
{ … }
void usb_remove_ep_devs(struct usb_host_endpoint *endpoint)
{ … }