mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] parameter: fix read only int support
@ 2017-03-09  9:57 Jean-Christophe PLAGNIOL-VILLARD
  2017-03-09  9:57 ` [PATCH 2/2] video: some framebuffer such as efi does support enable/disable Jean-Christophe PLAGNIOL-VILLARD
  2017-03-10  7:14 ` [PATCH 1/2] parameter: fix read only int support Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2017-03-09  9:57 UTC (permalink / raw)
  To: barebox

pass PARAM_FLAG_RO flag for read only it
so we can not change them

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 lib/parameter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/parameter.c b/lib/parameter.c
index 9f96d0760..65d6c7c0d 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -692,7 +692,7 @@ struct param_d *dev_add_param_int_ro(struct device_d *dev, const char *name,
 
 	piro = xzalloc(sizeof(*piro));
 
-	ret = __dev_add_param(&piro->param, dev, name, NULL, NULL, 0);
+	ret = __dev_add_param(&piro->param, dev, name, NULL, NULL, PARAM_FLAG_RO);
 	if (ret) {
 		free(piro);
 		return ERR_PTR(ret);
@@ -718,7 +718,7 @@ struct param_d *dev_add_param_llint_ro(struct device_d *dev, const char *name,
 
 	piro = xzalloc(sizeof(*piro));
 
-	ret = __dev_add_param(&piro->param, dev, name, NULL, NULL, 0);
+	ret = __dev_add_param(&piro->param, dev, name, NULL, NULL, PARAM_FLAG_RO);
 	if (ret) {
 		free(piro);
 		return ERR_PTR(ret);
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-10  9:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09  9:57 [PATCH 1/2] parameter: fix read only int support Jean-Christophe PLAGNIOL-VILLARD
2017-03-09  9:57 ` [PATCH 2/2] video: some framebuffer such as efi does support enable/disable Jean-Christophe PLAGNIOL-VILLARD
2017-03-10  7:26   ` Sascha Hauer
2017-03-10  9:37     ` Jean-Christophe PLAGNIOL-VILLARD
2017-03-10  7:14 ` [PATCH 1/2] parameter: fix read only int support Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox