[PATCH] aiodev: Constify 'unit' in 'struct aiodev'

Sascha Hauer s.hauer at pengutronix.de
Tue Apr 3 00:08:48 PDT 2018


On Mon, Mar 26, 2018 at 06:14:45AM -0700, Andrey Smirnov wrote:
> The way it is currently used, there's no reason for 'uint' field to be
> mutable, so constify it in order to allow 'aiodev' drivers to pass
> sting literals in that field.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
> ---
>  include/aiodev.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/include/aiodev.h b/include/aiodev.h
> index 0d4f7a294..5e38b4fab 100644
> --- a/include/aiodev.h
> +++ b/include/aiodev.h
> @@ -23,7 +23,7 @@
>  struct aiodevice;
>  struct aiochannel {
>  	int index;
> -	char *unit;
> +	const char *unit;
>  	struct aiodevice *aiodev;
>  
>  	int value;
> -- 
> 2.14.3
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at 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 |



More information about the barebox mailing list