|
@@ -76,7 +76,7 @@ attribute_container_register(struct attribute_container *cont)
|
|
INIT_LIST_HEAD(&cont->node);
|
|
INIT_LIST_HEAD(&cont->node);
|
|
klist_init(&cont->containers,internal_container_klist_get,
|
|
klist_init(&cont->containers,internal_container_klist_get,
|
|
internal_container_klist_put);
|
|
internal_container_klist_put);
|
|
-
|
|
|
|
|
|
+
|
|
mutex_lock(&attribute_container_mutex);
|
|
mutex_lock(&attribute_container_mutex);
|
|
list_add_tail(&cont->node, &attribute_container_list);
|
|
list_add_tail(&cont->node, &attribute_container_list);
|
|
mutex_unlock(&attribute_container_mutex);
|
|
mutex_unlock(&attribute_container_mutex);
|
|
@@ -104,14 +104,14 @@ attribute_container_unregister(struct attribute_container *cont)
|
|
spin_unlock(&cont->containers.k_lock);
|
|
spin_unlock(&cont->containers.k_lock);
|
|
mutex_unlock(&attribute_container_mutex);
|
|
mutex_unlock(&attribute_container_mutex);
|
|
return retval;
|
|
return retval;
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(attribute_container_unregister);
|
|
EXPORT_SYMBOL_GPL(attribute_container_unregister);
|
|
|
|
|
|
/* private function used as class release */
|
|
/* private function used as class release */
|
|
static void attribute_container_release(struct device *classdev)
|
|
static void attribute_container_release(struct device *classdev)
|
|
{
|
|
{
|
|
- struct internal_container *ic
|
|
|
|
|
|
+ struct internal_container *ic
|
|
= container_of(classdev, struct internal_container, classdev);
|
|
= container_of(classdev, struct internal_container, classdev);
|
|
struct device *dev = classdev->parent;
|
|
struct device *dev = classdev->parent;
|
|
|
|
|
|
@@ -185,7 +185,7 @@ attribute_container_add_device(struct device *dev,
|
|
n ? container_of(n, typeof(*pos), member) : \
|
|
n ? container_of(n, typeof(*pos), member) : \
|
|
({ klist_iter_exit(iter) ; NULL; }); \
|
|
({ klist_iter_exit(iter) ; NULL; }); \
|
|
}) ) != NULL; )
|
|
}) ) != NULL; )
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* attribute_container_remove_device - make device eligible for removal.
|
|
* attribute_container_remove_device - make device eligible for removal.
|
|
@@ -247,7 +247,7 @@ attribute_container_remove_device(struct device *dev,
|
|
* container, then use attribute_container_trigger() instead.
|
|
* container, then use attribute_container_trigger() instead.
|
|
*/
|
|
*/
|
|
void
|
|
void
|
|
-attribute_container_device_trigger(struct device *dev,
|
|
|
|
|
|
+attribute_container_device_trigger(struct device *dev,
|
|
int (*fn)(struct attribute_container *,
|
|
int (*fn)(struct attribute_container *,
|
|
struct device *,
|
|
struct device *,
|
|
struct device *))
|
|
struct device *))
|