linux/drivers/usb/usbip/stub_dev.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2003-2008 Takahiro Hirofuchi
 */

#include <linux/device.h>
#include <linux/file.h>
#include <linux/kthread.h>
#include <linux/module.h>

#include "usbip_common.h"
#include "stub.h"

/*
 * usbip_status shows the status of usbip-host as long as this driver is bound
 * to the target device.
 */
static ssize_t usbip_status_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(usbip_status);

/*
 * usbip_sockfd gets a socket descriptor of an established TCP connection that
 * is used to transfer usbip requests by kernel threads. -1 is a magic number
 * by which usbip connection is finished.
 */
static ssize_t usbip_sockfd_store(struct device *dev, struct device_attribute *attr,
			    const char *buf, size_t count)
{}
static DEVICE_ATTR_WO(usbip_sockfd);

static struct attribute *usbip_attrs[] =;
ATTRIBUTE_GROUPS();

static void stub_shutdown_connection(struct usbip_device *ud)
{}

static void stub_device_reset(struct usbip_device *ud)
{}

static void stub_device_unusable(struct usbip_device *ud)
{}

/**
 * stub_device_alloc - allocate a new stub_device struct
 * @udev: usb_device of a new device
 *
 * Allocates and initializes a new stub_device struct.
 */
static struct stub_device *stub_device_alloc(struct usb_device *udev)
{}

static void stub_device_free(struct stub_device *sdev)
{}

static int stub_probe(struct usb_device *udev)
{}

static void shutdown_busid(struct bus_id_priv *busid_priv)
{}

/*
 * called in usb_disconnect() or usb_deregister()
 * but only if actconfig(active configuration) exists
 */
static void stub_disconnect(struct usb_device *udev)
{}

#ifdef CONFIG_PM

/* These functions need usb_port_suspend and usb_port_resume,
 * which reside in drivers/usb/core/usb.h. Skip for now. */

static int stub_suspend(struct usb_device *udev, pm_message_t message)
{}

static int stub_resume(struct usb_device *udev, pm_message_t message)
{}

#endif	/* CONFIG_PM */

struct usb_device_driver stub_driver =;