linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
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 14:52:46 -0800	[thread overview]
Message-ID: <20040211225246.GA14776@kroah.com> (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:
> 
> I attempted to port over the vesafb driver to show up in the sysfs tree.
> Unfortunely it just hanges my box. From the code can someone tell me what 
> I'm doing wrong?
> 
> 
> +static struct device_driver vesafb_driver = {
> +	.name	= "VESA framebuffer",
> +	.probe	= vesafb_probe,
> +};
> +
> +static struct platform_device vesafb_device = {
> +	.name	= "VESA framebuffer",
> +	.id	= 0,
> +};

No release function for this device?  Brave...

> +int __init vesafb_init(void)
> +{
> +	int ret;
> +
> +	ret = driver_register(&vesafb_driver);

Woah, you are registering a driver that is associated with no bus?  

Where would this driver show up in the driver model?

What are you trying to achieve here?  



> +	if (!ret) {
> +		ret = platform_device_register(&vesafb_device);

What are you doing with this device?  It will work this way, but would
be nicer if you hook it up to something.  Can you have more than one
vesafb_device per system?

You also need to consider changing those .name fields to something that
looks sane in the sysfs tree.

thanks,

greg k-h


-------------------------------------------------------
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

  reply	other threads:[~2004-02-11 22:53 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 [this message]
2004-02-11 22:57 ` viro
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=20040211225246.GA14776@kroah.com \
    --to=greg@kroah.com \
    --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).