Re: [PATCH 1/2] gpio: gpio-generic: fix bgpio_map()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 05, 2017 at 10:22:36AM +0300, Antony Pavlov wrote:
> Signed-off-by: Antony Pavlov <antonynpavlov@xxxxxxxxx>
> ---
>  drivers/gpio/gpio-generic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
> index c6202fc651..164aaed97a 100644
> --- a/drivers/gpio/gpio-generic.c
> +++ b/drivers/gpio/gpio-generic.c
> @@ -327,7 +327,7 @@ static void __iomem *bgpio_map(struct device_d *dev, const char *name,
>  		return NULL;
>  	}
>  
> -	return ret;
> +	return IOMEM(r->start);
>  }

This still looks wrong. We have:

	void __iomem *ret;

	...

	ret = request_iomem_region(dev_name(dev), r->start, r->end);

request_iomem_region() returns a struct resource * from which you should
return the start element.

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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux