]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/usb/core/usb.c
USB : correct comments in usb/core/notify.c
[mv-sheeva.git] / drivers / usb / core / usb.c
index 69aa68287d3f8b5cf7884955b703760fd1897c46..8f142370103d48400d3adb6cb6b6f36eab5e4070 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/workqueue.h>
 
 #include <asm/io.h>
-#include <asm/scatterlist.h>
+#include <linux/scatterlist.h>
 #include <linux/mm.h>
 #include <linux/dma-mapping.h>
 
@@ -192,9 +192,34 @@ static void usb_release_dev(struct device *dev)
        kfree(udev);
 }
 
+#ifdef CONFIG_HOTPLUG
+static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
+{
+       struct usb_device *usb_dev;
+
+       usb_dev = to_usb_device(dev);
+
+       if (add_uevent_var(env, "BUSNUM=%03d", usb_dev->bus->busnum))
+               return -ENOMEM;
+
+       if (add_uevent_var(env, "DEVNUM=%03d", usb_dev->devnum))
+               return -ENOMEM;
+
+       return 0;
+}
+
+#else
+
+static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
+{
+       return -ENODEV;
+}
+#endif /* CONFIG_HOTPLUG */
+
 struct device_type usb_device_type = {
        .name =         "usb_device",
        .release =      usb_release_dev,
+       .uevent =       usb_dev_uevent,
 };
 
 #ifdef CONFIG_PM