mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fb: calculate resource end
@ 2013-03-28 10:19 Jan Weitzel
  2013-04-02  7:08 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Weitzel @ 2013-03-28 10:19 UTC (permalink / raw)
  To: barebox

commit 5f03074 changed storing struct resource end insted of size.
Fix calculation of end in fb

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
---
 drivers/video/fb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index ee53272..be29695 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -86,7 +86,7 @@ static int fb_setup_mode(struct device_d *dev, struct param_d *param,
 	if (!ret) {
 		dev->resource[0].start = (resource_size_t)info->screen_base;
 		info->cdev.size = info->xres * info->yres * (info->bits_per_pixel >> 3);
-		dev->resource[0].end = info->cdev.size - 1;
+		dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
 		dev_param_set_generic(dev, param, val);
 	} else
 		info->cdev.size = 0;
@@ -116,7 +116,7 @@ int register_framebuffer(struct fb_info *info)
 	info->cdev.priv = info;
 	dev->resource = xzalloc(sizeof(struct resource));
 	dev->resource[0].start = (resource_size_t)info->screen_base;
-	dev->resource[0].end = info->cdev.size - 1;
+	dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
 	dev->resource[0].flags = IORESOURCE_MEM;
 	dev->num_resources = 1;
 
-- 
1.7.0.4


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fb: calculate resource end
  2013-03-28 10:19 [PATCH] fb: calculate resource end Jan Weitzel
@ 2013-04-02  7:08 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2013-04-02  7:08 UTC (permalink / raw)
  To: Jan Weitzel; +Cc: barebox

On Thu, Mar 28, 2013 at 11:19:50AM +0100, Jan Weitzel wrote:
> commit 5f03074 changed storing struct resource end insted of size.
> Fix calculation of end in fb
> 
> Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>

Applied, thanks

Sascha

> ---
>  drivers/video/fb.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fb.c b/drivers/video/fb.c
> index ee53272..be29695 100644
> --- a/drivers/video/fb.c
> +++ b/drivers/video/fb.c
> @@ -86,7 +86,7 @@ static int fb_setup_mode(struct device_d *dev, struct param_d *param,
>  	if (!ret) {
>  		dev->resource[0].start = (resource_size_t)info->screen_base;
>  		info->cdev.size = info->xres * info->yres * (info->bits_per_pixel >> 3);
> -		dev->resource[0].end = info->cdev.size - 1;
> +		dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
>  		dev_param_set_generic(dev, param, val);
>  	} else
>  		info->cdev.size = 0;
> @@ -116,7 +116,7 @@ int register_framebuffer(struct fb_info *info)
>  	info->cdev.priv = info;
>  	dev->resource = xzalloc(sizeof(struct resource));
>  	dev->resource[0].start = (resource_size_t)info->screen_base;
> -	dev->resource[0].end = info->cdev.size - 1;
> +	dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
>  	dev->resource[0].flags = IORESOURCE_MEM;
>  	dev->num_resources = 1;
>  
> -- 
> 1.7.0.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-02  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-28 10:19 [PATCH] fb: calculate resource end Jan Weitzel
2013-04-02  7:08 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox