On Fri, Jul 10, 2009 at 12:01:23, Andrey Panin wrote: > On 191, 07 10, 2009 at 01:19:34AM -0400, Sudhakar Rajashekhara wrote: > > Adds LCD controller (LCDC) driver for TI's DA8xx/OMAP-L1xx > > architecture. LCDC specifications can be found at > > http://www.ti.com/litv/pdf/sprufm0a. > > > > LCDC on DA8xx consists of two independent controllers, the > > Raster Controller and the LCD Interface Display Driver (LIDD) > > controller. LIDD further supports character and graphic displays. > > > > This patch adds support for the graphic display (Sharp LQ035Q3DG01) > > found on the DA830 based EVM. The EVM details can be found at: > > http://support.spectrumdigital.com/boards/dskda830/revc/. > > > > Signed-off-by: Sudhakar Rajashekhara <sudhakar....@ti.com> > > Signed-off-by: Pavel Kiryukhin <pkiryuk...@ru.mvista.com> > > Signed-off-by: Steve Chen <sc...@mvista.com> > > Acked-by: Krzysztof Helt <krzysztof...@wp.pl> > > --- > > This patch applies to Linus's Kernel tree. > > > <SNIP> > > > +static int __init fb_probe(struct platform_device *device) > > +{ > > + struct da8xx_lcdc_platform_data *fb_pdata = > > + device->dev.platform_data; > > + struct lcd_ctrl_config *lcd_cfg; > > + struct da8xx_panel *lcdc_info; > > + struct fb_info *da8xx_fb_info; > > + struct resource *lcdc_regs; > > + struct clk *fb_clk = NULL; > > + struct da8xx_fb_par *par; > > + resource_size_t len; > > + int ret, i; > > + > > + if (fb_pdata == NULL) { > > + dev_err(&device->dev, "Can not get platform data\n"); > > + return -ENOENT; > > + } > > + > > + lcdc_regs = platform_get_resource(device, IORESOURCE_MEM, 0); > > + if (!lcdc_regs) { > > + dev_err(&device->dev, > > + "Can not get memory resource for LCD controller\n"); > > + return -ENOENT; > > + } > > + > > + len = lcdc_regs->end - lcdc_regs->start + 1; > > + > > + lcdc_regs = request_mem_region(lcdc_regs->start, len, lcdc_regs->name); > > + if (!lcdc_regs) > > + return -EBUSY; > > + > > + da8xx_fb_reg_base = (resource_size_t)ioremap(lcdc_regs->start, len); > > 1. ioremap() can return NULL, so check is needed here; > 2. ioremapped region is leaked in case of error and on module unload too. >
Agreed. Will add checks and submit an updated version of the patch. Thanks, Sudhakar _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source