[PATCH 1/2] pbl: console: Make it work with multiple setup_c()

Trent Piepho tpiepho at kymetacorp.com
Wed Sep 14 10:41:06 PDT 2016


On Wed, 2016-09-14 at 10:21 +0200, Sascha Hauer wrote:
> +
> +static void (*__putc)(void *ctx, int c) = INVALID_PTR;
> +static void *putc_ctx = INVALID_PTR;

There's also __attribute__ ((section(".data"))).  U-boot uses that. It
does make it clear why INVALID_PTR is not NULL.

Also, could use ERR_PTR(-EINVAL).



More information about the barebox mailing list