#include "usb.h"
-#ifdef CONFIG_HOTPLUG
-
/*
* Adds a new dynamic USBdevice ID to this driver,
* and cause the driver to probe for all devices again.
}
spin_unlock(&usb_drv->dynids.lock);
}
-#else
-static inline int usb_create_newid_files(struct usb_driver *usb_drv)
-{
- return 0;
-}
-
-static void usb_remove_newid_files(struct usb_driver *usb_drv)
-{
-}
-
-static inline void usb_free_dynids(struct usb_driver *usb_drv)
-{
-}
-#endif
static const struct usb_device_id *usb_match_dynamic_id(struct usb_interface *intf,
struct usb_driver *drv)
return 0;
}
-#ifdef CONFIG_HOTPLUG
static int usb_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct usb_device *usb_dev;
return 0;
}
-#else
-
-static int usb_uevent(struct device *dev, struct kobj_uevent_env *env)
-{
- return -ENODEV;
-}
-#endif /* CONFIG_HOTPLUG */
-
/**
* usb_register_device_driver - register a USB device (not interface) driver
* @new_udriver: USB operations for the device driver
kfree(intf);
}
-#ifdef CONFIG_HOTPLUG
static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct usb_device *usb_dev;
return 0;
}
-#else
-
-static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env)
-{
- return -ENODEV;
-}
-#endif /* CONFIG_HOTPLUG */
-
struct device_type usb_if_device_type = {
.name = "usb_interface",
.release = usb_release_interface,
kfree(udev);
}
-#ifdef CONFIG_HOTPLUG
static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct usb_device *usb_dev;
return 0;
}
-#else
-
-static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
-{
- return -ENODEV;
-}
-#endif /* CONFIG_HOTPLUG */
-
#ifdef CONFIG_PM
/* USB device Power-Management thunks.
return retval;
}
-#ifdef CONFIG_HOTPLUG
static ssize_t store_new_id(struct device_driver *driver,
const char *buf, size_t count)
{
spin_unlock(&drv->dynids.lock);
}
-#else
-static struct driver_attribute drv_attrs[] = {
- __ATTR_NULL,
-};
-static inline void free_dynids(struct usb_serial_driver *drv)
-{
-}
-#endif
-
struct bus_type usb_serial_bus_type = {
.name = "usb-serial",
.match = usb_serial_device_match,