[PATCH 2/2] Force set console baudrate at enable time

Sascha Hauer s.hauer at pengutronix.de
Wed Jul 10 17:28:18 EDT 2013


On Wed, Jul 10, 2013 at 04:15:10PM +0600, Alexey Galakhov wrote:
> Signed-off-by: Alexey Galakhov <agalakhov at gmail.com>
> ---
>  common/console.c |   11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/common/console.c b/common/console.c
> index a0a06f6..28941d6 100644
> --- a/common/console.c
> +++ b/common/console.c
> @@ -80,6 +80,12 @@ static int console_std_set(struct device_d *dev, struct param_d *param,
>  		flag |= CONSOLE_STDERR;
>  	}
>  
> +	if (flag && !cdev->f_active) {
> +		/* The device is being activated, set its baudrate */
> +		if (cdev->setbrg)
> +			cdev->setbrg(cdev, cdev->baudrate);
> +	}
> +
>  	active[i] = 0;
>  	cdev->f_active = flag;
>  
> @@ -104,6 +110,8 @@ static int console_baudrate_set(struct param_d *param, void *priv)
>  	struct console_device *cdev = priv;
>  	unsigned char c;
>  
> +	/* If the device is already active, change its baudrate.
> +	The baudrate of an inactive device will be set at activation time. */

	/*
	 * multiline comments
	 * like this please
	 */

Fixed this while applying.

Thanks
 Sascha

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