lkml.org 
[lkml]   [2004]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: fbdev driver and sysfs question.
    On Wed, Feb 11, 2004 at 10:26:45PM +0000, James Simmons wrote:
    > + info = framebuffer_alloc(0, &dev->dev);
    > + if (!info)
    > + return -ENOMEM;
    > + dev_set_drvdata(&dev->dev, info);
    > +
    > + info->screen_base = ioremap(vesafb_fix.smem_start, vesafb_fix.smem_len);
    > + if (!info->screen_base) {
    > release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len);
    > printk(KERN_ERR
    > "vesafb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n",

    Who will free info?

    > - fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0);
    > + fb_alloc_cmap(&info->cmap, video_cmap_len, 0);
    >
    > - if (register_framebuffer(&fb_info)<0)
    > + if (register_framebuffer(info) < 0)

    Who will undo allocations? BTW, that applies to the old code too -
    even if fb_alloc_cmap() doesn't require any actions on cleanup, ioremap()
    definitely does.

    > return -EINVAL;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:00    [W:0.028 / U:59.524 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site