[PATCH 13/16] ARM: LPC32XX: Various fixes with readl/writel types

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Feb 3 05:20:31 EST 2010


On Tue, Feb 02, 2010 at 03:59:25PM -0800, wellsk40 at gmail.com wrote:
>  	if (fb->fb.screen_base == NULL) {
> -		fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev,
> -			PANEL_SIZE, &dma, GFP_KERNEL);
> +		fb->fb.screen_base = (__force char __iomem *)
> +			dma_alloc_writecombine(&fb->dev->dev, PANEL_SIZE,
> +			&dma, GFP_KERNEL);

There are times when putting up with sparse complaints is the right thing
to do, and this is one situation where that is true.

>  		fb->fb.fix.smem_start = dma;
>  	}
>  
> @@ -130,7 +131,7 @@ static int lpc32xx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
>  #endif
>  
>  	return dma_mmap_writecombine(&fb->dev->dev, vma,
> -				     fb->fb.screen_base,
> +				     (__force void *) fb->fb.screen_base,

Same here.

>  				     fb->fb.fix.smem_start,
>  				     fb->fb.fix.smem_len);
>  }
> @@ -140,11 +141,12 @@ static void lpc32xx_clcd_remove(struct clcd_fb *fb)
>  #ifdef CONFIG_MACH_LPC32XX_IRAM_FOR_CLCD
>  	if (PANEL_SIZE > CONFIG_ARCH_LPC32XX_IRAM_SIZE)
>  		dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
> -			fb->fb.screen_base, fb->fb.fix.smem_start);
> +			(__force void *) fb->fb.screen_base,
> +			fb->fb.fix.smem_start);

and here.

>  
>  #else
>  	dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
> -		fb->fb.screen_base, fb->fb.fix.smem_start);
> +		(__force void *) fb->fb.screen_base, fb->fb.fix.smem_start);

and here.



More information about the linux-arm-kernel mailing list