linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: viro@parcelfarce.linux.theplanet.co.uk
To: James Simmons <jsimmons@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Fbdev development list
	<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: fbdev driver and sysfs question.
Date: Wed, 11 Feb 2004 22:57:24 +0000	[thread overview]
Message-ID: <20040211225724.GN21151@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0402112225360.25659-100000@phoenix.infradead.org>

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;


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

  parent reply	other threads:[~2004-02-11 22:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-11 22:26 fbdev driver and sysfs question James Simmons
2004-02-11 22:52 ` Greg KH
2004-02-11 22:57 ` viro [this message]
2004-02-13 18:44   ` James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040211225724.GN21151@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).