Re: fbdev driver and sysfs question.
From: Greg KH <hidden>
Date: 2004-02-11 22:52:48
Also in:
lkml
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