[PATCH 3/4] nios2/serial_altera.c: switch to ressources

Sascha Hauer s.hauer at pengutronix.de
Tue Jul 26 02:52:46 EDT 2011


On Mon, Jul 25, 2011 at 09:50:19PM +0200, franck.jullien at gmail.com wrote:
> From: Franck Jullien <franck.jullien at gmail.com>
> 
> Signed-off-by: Franck Jullien <franck.jullien at gmail.com>
> ---
>  drivers/serial/serial_altera.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/serial/serial_altera.c b/drivers/serial/serial_altera.c
> index 54c7178..c0a8356 100644
> --- a/drivers/serial/serial_altera.c
> +++ b/drivers/serial/serial_altera.c
> @@ -29,7 +29,7 @@
>  
>  static int altera_serial_setbaudrate(struct console_device *cdev, int baudrate)
>  {
> -	struct nios_uart *uart = (struct nios_uart *)cdev->dev->map_base;
> +	struct nios_uart *uart = (struct nios_uart *)dev_request_mem_region(cdev->dev, 0);

Hm, dev_request_mem_region is not really a request function, so this
will work. Anyway, once we turn it into a real request function this
would break. Please use cdev->dev->priv instead.

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