/* usbip_status shows status of usbip as long as this driver is bound to the target device.  */
static ssize_t show_status(struct device *dev, struct device_attribute *attr, char *buf)
/* usbip_status shows status of usbip as long as this driver is bound to the target device.  */
static ssize_t show_status(struct device *dev, struct device_attribute *attr, char *buf)
{
	struct stub_device *sdev = dev_get_drvdata(dev);
	int status;
	if (!sdev) {
		dev_err(dev, "sdev is null\n");
		return -ENODEV;
	}
	spin_lock(&sdev->ud.lock);
	status = sdev->ud.status;
	spin_unlock(&sdev->ud.lock);
	return snprintf(buf, PAGE_SIZE, "%d\n", status);
}