#include <linux/kthread.h>
#include <linux/file.h>
#include <linux/net.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/nospec.h>
#include "usbip_common.h"
#include "vhci.h"
static void port_show_vhci(char **out, int hub, int port, struct vhci_device *vdev)
{ … }
static ssize_t status_show_vhci(int pdev_nr, char *out)
{ … }
static ssize_t status_show_not_ready(int pdev_nr, char *out)
{ … }
static int status_name_to_id(const char *name)
{ … }
static ssize_t status_show(struct device *dev,
struct device_attribute *attr, char *out)
{ … }
static ssize_t nports_show(struct device *dev, struct device_attribute *attr,
char *out)
{ … }
static DEVICE_ATTR_RO(nports);
static int vhci_port_disconnect(struct vhci_hcd *vhci_hcd, __u32 rhport)
{ … }
static int valid_port(__u32 *pdev_nr, __u32 *rhport)
{ … }
static ssize_t detach_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(detach);
static int valid_args(__u32 *pdev_nr, __u32 *rhport,
enum usb_device_speed speed)
{ … }
static ssize_t attach_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(attach);
#define MAX_STATUS_NAME …
struct status_attr { … };
static struct status_attr *status_attrs;
static void set_status_attr(int id)
{ … }
static int init_status_attrs(void)
{ … }
static void finish_status_attrs(void)
{ … }
struct attribute_group vhci_attr_group = …;
int vhci_init_attr_group(void)
{ … }
void vhci_finish_attr_group(void)
{ … }