On Tue, 2004-01-20 at 13:28, Greg KH wrote: > On Tue, Jan 20, 2004 at 01:16:41PM -0700, Liberty Young wrote: > > > > But the kernel doesn't print out the expected results! What am i doing wrong? > > Relying on devfs being enabled is the main problem :) > > Just use the minor number in the inode on open to determine which > structure in your driver is being accessed. Then set the private > pointer in the struct file to this value. That can then be used on all > future read(), write(), and release() calls. > > Hope this helps, > > greg k-h > Relying on devfs being enabled is pretty much okay, as this driver is more internal and we're using devfs...but point taken. I think to solve _this_ problem, i'll do just that. That aside, I'm interested in why i can't set the void *private argument to a default value in open() and other related calls. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/