.. | .. |
---|
30 | 30 | #include <linux/attribute_container.h> |
---|
31 | 31 | #include <linux/transport_class.h> |
---|
32 | 32 | |
---|
| 33 | +static int transport_remove_classdev(struct attribute_container *cont, |
---|
| 34 | + struct device *dev, |
---|
| 35 | + struct device *classdev); |
---|
| 36 | + |
---|
33 | 37 | /** |
---|
34 | 38 | * transport_class_register - register an initial transport class |
---|
35 | 39 | * |
---|
.. | .. |
---|
172 | 176 | * routine is simply a trigger point used to add the device to the |
---|
173 | 177 | * system and register attributes for it. |
---|
174 | 178 | */ |
---|
175 | | - |
---|
176 | | -void transport_add_device(struct device *dev) |
---|
| 179 | +int transport_add_device(struct device *dev) |
---|
177 | 180 | { |
---|
178 | | - attribute_container_device_trigger(dev, transport_add_class_device); |
---|
| 181 | + return attribute_container_device_trigger_safe(dev, |
---|
| 182 | + transport_add_class_device, |
---|
| 183 | + transport_remove_classdev); |
---|
179 | 184 | } |
---|
180 | 185 | EXPORT_SYMBOL_GPL(transport_add_device); |
---|
181 | 186 | |
---|