lkml.org 
[lkml]   [2013]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3] video: add OpenCores VGA/LCD framebuffer driver
From
On Tue, Nov 26, 2013 at 8:10 AM, Michal Simek <monstr@monstr.eu> wrote:
> On 11/22/2013 05:34 AM, Stefan Kristiansson wrote:
> This construction seems to me too complicated and can be simpler.
>
> What about this?
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

Don't forget to check for res being non-NULL here.

> res->flags &= ~IORESOURCE_CACHEABLE;
> fbdev->regs = devm_ioremap_resource(&pdev->dev, res);
> if (IS_ERR(fbdev->regs))
> return PTR_ERR(fbdev->regs);

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


\
 
 \ /
  Last update: 2013-11-26 09:41    [W:0.088 / U:1.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site