mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] parameter: fix read only int support
Date: Fri, 10 Mar 2017 08:14:01 +0100	[thread overview]
Message-ID: <20170310071401.2ivh5sdpi77zobki@pengutronix.de> (raw)
In-Reply-To: <1489053441-12772-1-git-send-email-plagnioj@jcrosoft.com>

On Thu, Mar 09, 2017 at 10:57:20AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> 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(-)

Applied (only this one), thanks

Sascha

> 
> 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
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      parent reply	other threads:[~2017-03-10  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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:26   ` Sascha Hauer
2017-03-10  9:37     ` Jean-Christophe PLAGNIOL-VILLARD
2017-03-10  7:14 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170310071401.2ivh5sdpi77zobki@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox