Merge tag 'for-linus' of git://github.com/openrisc/linux
[linux-2.6-microblaze.git] / drivers / base / transport_class.c
index 5ed86de..ccc8620 100644 (file)
 #include <linux/attribute_container.h>
 #include <linux/transport_class.h>
 
+static int transport_remove_classdev(struct attribute_container *cont,
+                                    struct device *dev,
+                                    struct device *classdev);
+
 /**
  * transport_class_register - register an initial transport class
  *
@@ -172,10 +176,11 @@ static int transport_add_class_device(struct attribute_container *cont,
  * routine is simply a trigger point used to add the device to the
  * system and register attributes for it.
  */
-
-void transport_add_device(struct device *dev)
+int transport_add_device(struct device *dev)
 {
-       attribute_container_device_trigger(dev, transport_add_class_device);
+       return attribute_container_device_trigger_safe(dev,
+                                       transport_add_class_device,
+                                       transport_remove_classdev);
 }
 EXPORT_SYMBOL_GPL(transport_add_device);