summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-04-06 08:23:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-04-06 08:23:45 +0200
commitf1253fdf8e763c8cadf0ebaeb3cbaf1f720c7a30 (patch)
treecd1ed64f715dda08d7c7bb106405aa5a9502505d
parentc3995e85d2b6efdfd665ee420bc49c7436f11bed (diff)
downloadbarebox-f1253fdf8e763c8cadf0ebaeb3cbaf1f720c7a30.tar.gz
barebox-f1253fdf8e763c8cadf0ebaeb3cbaf1f720c7a30.tar.xz
param: Add dev member to struct param_d
This will make it unnecessary to pass the dev pointer around later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--include/param.h1
-rw-r--r--lib/parameter.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/param.h b/include/param.h
index 3a585cd193..2a1b4fac7b 100644
--- a/include/param.h
+++ b/include/param.h
@@ -15,6 +15,7 @@ struct param_d {
unsigned int flags;
char *name;
char *value;
+ struct device_d *dev;
struct list_head list;
};
diff --git a/lib/parameter.c b/lib/parameter.c
index c00b82438d..94da79c697 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -159,6 +159,7 @@ static struct param_d *__dev_add_param(struct device_d *dev, const char *name,
param->name = strdup(name);
param->flags = flags;
+ param->dev = dev;
list_add_tail(&param->list, &dev->parameters);
return param;