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 <r...@ramses-pyramidenbau.de>

diff --git a/driver/cell.c b/driver/cell.c
index 8681175..7cced42 100644
--- a/driver/cell.c
+++ b/driver/cell.c
@@ -76,7 +76,7 @@ struct cell *jailhouse_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.2

-- 
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 jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to