Messages in this thread | | | Date | Tue, 26 Nov 2013 09:19:58 +0100 | Subject | Re: [PATCH v3] video: add OpenCores VGA/LCD framebuffer driver | From | Geert Uytterhoeven <> |
| |
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
| |