Re: fbdev driver and sysfs question.

From: Greg KH
Date: Wed Feb 11 2004 - 17:54:19 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/