struct cell now has information about the cell name. It is not necessary
to pass the name of the cell to jh_sysfs_cell_create.

Signed-off-by: Ralf Ramsauer <[email protected]>
---
 driver/cell.c  | 2 +-
 driver/sysfs.c | 4 ++--
 driver/sysfs.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/driver/cell.c b/driver/cell.c
index 3cccf80..06e2b7f 100644
--- a/driver/cell.c
+++ b/driver/cell.c
@@ -77,7 +77,7 @@ static struct cell *cell_create(const struct 
jailhouse_cell_desc *cell_desc)
                return ERR_PTR(err);
        }
 
-       err = jailhouse_sysfs_cell_create(cell, cell_desc->name);
+       err = jailhouse_sysfs_cell_create(cell);
        if (err)
                /* cleanup done by jailhouse_sysfs_cell_create */
                return ERR_PTR(err);
diff --git a/driver/sysfs.c b/driver/sysfs.c
index 4959b56..a18c2b9 100644
--- a/driver/sysfs.c
+++ b/driver/sysfs.c
@@ -232,12 +232,12 @@ static struct kobj_type cell_type = {
        .default_attrs = cell_attrs,
 };
 
-int jailhouse_sysfs_cell_create(struct cell *cell, const char *name)
+int jailhouse_sysfs_cell_create(struct cell *cell)
 {
        int err;
 
        err = kobject_init_and_add(&cell->kobj, &cell_type, cells_dir, "%s",
-                                  name);
+                                  cell->name);
        if (err) {
                jailhouse_cell_kobj_release(&cell->kobj);
                return err;
diff --git a/driver/sysfs.h b/driver/sysfs.h
index ad0e2f9..f5cdc34 100644
--- a/driver/sysfs.h
+++ b/driver/sysfs.h
@@ -15,7 +15,7 @@
 
 #include <linux/device.h>
 
-int jailhouse_sysfs_cell_create(struct cell *cell, const char *name);
+int jailhouse_sysfs_cell_create(struct cell *cell);
 void jailhouse_sysfs_cell_register(struct cell *cell);
 void jailhouse_sysfs_cell_delete(struct cell *cell);
 
-- 
2.9.3

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to