Re: [PATCH 1/2] parameter: fix read only int support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux