summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-07-17 14:53:48 -0700
committerJoel Becker <joel.becker@oracle.com>2008-07-17 14:53:48 -0700
commitf89ab8619e5320cc9c2576f5f8dcbaf6c0ba3950 (patch)
treee703050b232c76de7cb25afd63a2b4dd885c4bb9 /Documentation
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Revert "configfs: Allow ->make_item() and ->make_group() to return detailed errors."
This reverts commit 11c3b79218390a139f2d474ee1e983a672d5839a. The code will move to PTR_ERR(). Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/configfs/configfs.txt10
-rw-r--r--Documentation/filesystems/configfs/configfs_example.c14
2 files changed, 10 insertions, 14 deletions
diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt
index 15838d706ea..44c97e6accb 100644
--- a/Documentation/filesystems/configfs/configfs.txt
+++ b/Documentation/filesystems/configfs/configfs.txt
@@ -233,12 +233,10 @@ accomplished via the group operations specified on the group's
config_item_type.
struct configfs_group_operations {
- int (*make_item)(struct config_group *group,
- const char *name,
- struct config_item **new_item);
- int (*make_group)(struct config_group *group,
- const char *name,
- struct config_group **new_group);
+ struct config_item *(*make_item)(struct config_group *group,
+ const char *name);
+ struct config_group *(*make_group)(struct config_group *group,
+ const char *name);
int (*commit_item)(struct config_item *item);
void (*disconnect_notify)(struct config_group *group,
struct config_item *item);
diff --git a/Documentation/filesystems/configfs/configfs_example.c b/Documentation/filesystems/configfs/configfs_example.c
index 0b422acd470..25151fd5c2c 100644
--- a/Documentation/filesystems/configfs/configfs_example.c
+++ b/Documentation/filesystems/configfs/configfs_example.c
@@ -273,13 +273,13 @@ static inline struct simple_children *to_simple_children(struct config_item *ite
return item ? container_of(to_config_group(item), struct simple_children, group) : NULL;
}
-static int simple_children_make_item(struct config_group *group, const char *name, struct config_item **new_item)
+static struct config_item *simple_children_make_item(struct config_group *group, const char *name)
{
struct simple_child *simple_child;
simple_child = kzalloc(sizeof(struct simple_child), GFP_KERNEL);
if (!simple_child)
- return -ENOMEM;
+ return NULL;
config_item_init_type_name(&simple_child->item, name,
@@ -287,8 +287,7 @@ static int simple_children_make_item(struct config_group *group, const char *nam
simple_child->storeme = 0;
- *new_item = &simple_child->item;
- return 0;
+ return &simple_child->item;
}
static struct configfs_attribute simple_children_attr_description = {
@@ -360,21 +359,20 @@ static struct configfs_subsystem simple_children_subsys = {
* children of its own.
*/
-static int group_children_make_group(struct config_group *group, const char *name, struct config_group **new_group)
+static struct config_group *group_children_make_group(struct config_group *group, const char *name)
{
struct simple_children *simple_children;
simple_children = kzalloc(sizeof(struct simple_children),
GFP_KERNEL);
if (!simple_children)
- return -ENOMEM;
+ return NULL;
config_group_init_type_name(&simple_children->group, name,
&simple_children_type);
- *new_group = &simple_children->group;
- return 0;
+ return &simple_children->group;
}
static struct configfs_attribute group_children_attr_description = {