[PATCH] console: fix new console registration

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Jun 10 08:59:15 EDT 2013


On 21:43 Sun 09 Jun     , Steffen Trumtrar wrote:
> The console_register-function gets the baudrate from a kconfig parameter and
> sets the console accordingly, if a setbrg function is registered.
> Add the missing call to setbrg on the newly registered console to actually
> use the baudrate setting.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
> ---
>  common/console.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/common/console.c b/common/console.c
> index a0a06f6..abf5322 100644
> --- a/common/console.c
> +++ b/common/console.c
> @@ -147,6 +147,7 @@ int console_register(struct console_device *newcdev)
>  		newcdev->baudrate = CONFIG_BAUDRATE;
>  		dev_add_param_int(dev, "baudrate", console_baudrate_set,
>  			NULL, &newcdev->baudrate, "%u", newcdev);
> +		newcdev->setbrg(newcdev, newcdev->baudrate);
this need to be done at the enable not the register

Best Regards,
J.
>  	}
>  
>  	dev_add_param(dev, "active", console_std_set, NULL, 0);
> -- 
> 1.8.2.rc2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox



More information about the barebox mailing list